Skip to content

Commit

Permalink
try using openai api key for dalle-3 plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
lloydzhou committed Sep 23, 2024
1 parent ed20fd2 commit 90e7b5a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/store/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 90e7b5a

Please sign in to comment.