From f572df051d705c971174304acfaf402b098cd9b2 Mon Sep 17 00:00:00 2001 From: Hk-Gosuto Date: Thu, 21 Dec 2023 18:51:25 +0800 Subject: [PATCH] chore: code --- app/api/common.ts | 2 +- app/client/platforms/google.ts | 14 +------------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/app/api/common.ts b/app/api/common.ts index 121dc4fc0..2f1482be8 100644 --- a/app/api/common.ts +++ b/app/api/common.ts @@ -141,7 +141,7 @@ export async function requestGoogleGemini(req: NextRequest) { } console.log("[Proxy] ", path); - console.log("[Base Url]", baseUrl); + console.log("[Google Base Url]", baseUrl); // this fix [Org ID] undefined in server side if not using custom point if (serverConfig.openaiOrgId !== undefined) { console.log("[Org ID]", serverConfig.openaiOrgId); diff --git a/app/client/platforms/google.ts b/app/client/platforms/google.ts index d5f073c8b..dcb864233 100644 --- a/app/client/platforms/google.ts +++ b/app/client/platforms/google.ts @@ -24,8 +24,6 @@ import { fetchEventSource, } from "@fortaine/fetch-event-source"; import { prettyObject } from "@/app/utils/format"; -import { getClientConfig } from "@/app/config/client"; -import { makeAzurePath } from "@/app/azure"; export interface OpenAIListModelResponse { object: string; @@ -41,16 +39,6 @@ export class GeminiApi implements LLMApi { path(path: string): string { const accessStore = useAccessStore.getState(); - - // const isAzure = accessStore.provider === ServiceProvider.Azure; - - // if (isAzure && !accessStore.isValidAzure()) { - // throw Error( - // "incomplete azure config, please check it in your settings page", - // ); - // } - - // let baseUrl = isAzure ? accessStore.azureUrl : accessStore.openaiUrl; let baseUrl = ApiPath.GoogleAI; // if (baseUrl.length === 0) { // const isApp = !!getClientConfig()?.isApp; @@ -176,7 +164,7 @@ export class GeminiApi implements LLMApi { clearTimeout(requestTimeoutId); const contentType = res.headers.get("content-type"); console.log( - "[OpenAI] request response content type: ", + "[Google] request response content type: ", contentType, );