Przeglądaj źródła

try using openai api key for dalle-3 plugin

lloydzhou 1 rok temu
rodzic
commit
90e7b5aecf
1 zmienionych plików z 6 dodań i 6 usunięć
  1. 6 6
      app/store/plugin.ts

+ 6 - 6
app/store/plugin.ts

@@ -60,12 +60,12 @@ export const FunctionToolService = {
     };
     if (authLocation == "header") {
       headers[headerName] = tokenValue;
-      // try using openaiApiKey for Dalle3 Plugin.
-      if (!tokenValue && plugin.id === "dalle3") {
-        const openaiApiKey = useAccessStore.getState().openaiApiKey;
-        if (openaiApiKey) {
-          headers[headerName] = `Bearer ${openaiApiKey}`;
-        }
+    }
+    // try using openaiApiKey for Dalle3 Plugin.
+    if (!tokenValue && plugin.id === "dalle3") {
+      const openaiApiKey = useAccessStore.getState().openaiApiKey;
+      if (openaiApiKey) {
+        headers[headerName] = `Bearer ${openaiApiKey}`;
       }
     }
     const api = new OpenAPIClientAxios({