From dfc36e5210735ba28c8416796b112f81978027e1 Mon Sep 17 00:00:00 2001 From: lloydzhou Date: Thu, 1 Aug 2024 19:02:40 +0800 Subject: [PATCH] update --- app/client/platforms/tencent.ts | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/app/client/platforms/tencent.ts b/app/client/platforms/tencent.ts index 621fede1027..67dd9225ce7 100644 --- a/app/client/platforms/tencent.ts +++ b/app/client/platforms/tencent.ts @@ -1,10 +1,5 @@ "use client"; -import { - ApiPath, - DEFAULT_API_HOST, - REQUEST_TIMEOUT_MS, - Tencent, -} from "@/app/constant"; +import { ApiPath, DEFAULT_API_HOST, REQUEST_TIMEOUT_MS } from "@/app/constant"; import { useAccessStore, useAppConfig, useChatStore } from "@/app/store"; import { @@ -67,7 +62,7 @@ function capitalizeKeys(obj: any): any { } export class HunyuanApi implements LLMApi { - path(path: string): string { + path(): string { const accessStore = useAccessStore.getState(); let baseUrl = ""; @@ -79,7 +74,7 @@ export class HunyuanApi implements LLMApi { if (baseUrl.length === 0) { const isApp = !!getClientConfig()?.isApp; baseUrl = isApp - ? DEFAULT_API_HOST + "/api/proxy/bytedance" + ? DEFAULT_API_HOST + "/api/proxy/tencent" : ApiPath.Tencent; } @@ -128,7 +123,7 @@ export class HunyuanApi implements LLMApi { options.onController?.(controller); try { - const chatPath = this.path(Tencent.ChatPath); + const chatPath = this.path(); const chatPayload = { method: "POST", body: JSON.stringify(requestPayload),