Преглед на файлове

fix: #1509 openai url split

Yidadaa преди 1 година
родител
ревизия
8b0cf7d248
променени са 1 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 4 2
      app/client/platforms/openai.ts

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

@@ -10,8 +10,10 @@ export class ChatGPTApi implements LLMApi {
   public SubsPath = "dashboard/billing/subscription";
 
   path(path: string): string {
-    const openaiUrl = useAccessStore.getState().openaiUrl;
-    if (openaiUrl.endsWith("/")) openaiUrl.slice(0, openaiUrl.length - 1);
+    let openaiUrl = useAccessStore.getState().openaiUrl;
+    if (openaiUrl.endsWith("/")) {
+      openaiUrl = openaiUrl.slice(0, openaiUrl.length - 1);
+    }
     return [openaiUrl, path].join("/");
   }