From d4419293fbe27265701b9683b9cebcf310d53198 Mon Sep 17 00:00:00 2001 From: hailin Date: Thu, 26 Jun 2025 00:15:22 +0800 Subject: [PATCH] . --- chatdesk-ui/app/api/chat/custom/route.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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")