Add custom_openai models only if custom_openai is configured
This commit is contained in:
parent
bcebdb5fd9
commit
70919ea228
1 changed files with 3 additions and 1 deletions
|
|
@ -104,6 +104,7 @@ export const getAvailableChatModelProviders = async () => {
|
||||||
const customOpenAiApiUrl = getCustomOpenaiApiUrl();
|
const customOpenAiApiUrl = getCustomOpenaiApiUrl();
|
||||||
const customOpenAiModelName = getCustomOpenaiModelName();
|
const customOpenAiModelName = getCustomOpenaiModelName();
|
||||||
|
|
||||||
|
if (customOpenAiApiKey && customOpenAiApiUrl && customOpenAiModelName) {
|
||||||
models['custom_openai'] = {
|
models['custom_openai'] = {
|
||||||
...(customOpenAiApiKey && customOpenAiApiUrl && customOpenAiModelName
|
...(customOpenAiApiKey && customOpenAiApiUrl && customOpenAiModelName
|
||||||
? {
|
? {
|
||||||
|
|
@ -121,6 +122,7 @@ export const getAvailableChatModelProviders = async () => {
|
||||||
}
|
}
|
||||||
: {}),
|
: {}),
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
return models;
|
return models;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue