try using openai api key for dalle-3 plugin
This commit is contained in:
parent
ed20fd2962
commit
90e7b5aecf
|
@ -60,6 +60,7 @@ 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;
|
||||
|
@ -67,7 +68,6 @@ export const FunctionToolService = {
|
|||
headers[headerName] = `Bearer ${openaiApiKey}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
const api = new OpenAPIClientAxios({
|
||||
definition: yaml.load(plugin.content) as any,
|
||||
axiosConfigDefaults: {
|
||||
|
|
Loading…
Reference in New Issue