diff --git a/chatdesk-ui/app/api/chat/custom/route.ts b/chatdesk-ui/app/api/chat/custom/route.ts index 94ff683..7ccc6d0 100644 --- a/chatdesk-ui/app/api/chat/custom/route.ts +++ b/chatdesk-ui/app/api/chat/custom/route.ts @@ -10,6 +10,7 @@ import { getRuntimeEnv } from "@/lib/runtime-env" //export const runtime: ServerRuntime = "edge" +export const runtime = "nodejs" export async function POST(request: Request) { const json = await request.json() @@ -20,10 +21,14 @@ export async function POST(request: Request) { } try { + // const supabaseAdmin = createClient( + // getRuntimeEnv("SUPABASE_URL") ?? "http://localhost:8000", + // process.env.SUPABASE_SERVICE_ROLE_KEY! + // ) const supabaseAdmin = createClient( - getRuntimeEnv("SUPABASE_URL") ?? "http://localhost:8000", + "http://67.223.119.33:8000", // ⬅️ 硬编码 IP 地址 process.env.SUPABASE_SERVICE_ROLE_KEY! - ) + ) const { data: customModel, error } = await supabaseAdmin .from("models")