소스 검색

fix: fix bug in generating wrong gemini request url

YeungYeah 1 년 전
부모
커밋
26c2598f56
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      app/client/platforms/google.ts

+ 4 - 2
app/client/platforms/google.ts

@@ -123,8 +123,10 @@ export class GeminiProApi implements LLMApi {
     const controller = new AbortController();
     options.onController?.(controller);
     try {
-      if (!baseUrl && isApp) {
-        baseUrl = DEFAULT_API_HOST + "/api/proxy/google/";
+      if (!baseUrl) {
+        baseUrl = isApp
+          ? DEFAULT_API_HOST + "/api/proxy/google/"
+          : this.path("");
       }
       baseUrl = `${baseUrl}/${Google.ChatPath(modelConfig.model)}`.replaceAll(
         "//",