mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-24 03:41:56 +03:00
fix(openAiKey): handle nullish values (#1080)
This commit is contained in:
parent
aaf841136c
commit
47b8d697c6
@ -80,11 +80,8 @@ export const useSettingsTab = ({ brainId }: UseSettingsTabProps) => {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (
|
||||
brainKey === "openai_api_key" &&
|
||||
brain["openai_api_key"] !== undefined
|
||||
) {
|
||||
setValue("openAiKey", brain["openai_api_key"]);
|
||||
if (brainKey === "openai_api_key") {
|
||||
setValue("openAiKey", brain["openai_api_key"] ?? "");
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -333,7 +330,7 @@ export const useSettingsTab = ({ brainId }: UseSettingsTabProps) => {
|
||||
return {
|
||||
handleSubmit,
|
||||
register,
|
||||
openAiKey: openAiKey === "" ? undefined : openAiKey,
|
||||
openAiKey,
|
||||
model,
|
||||
temperature,
|
||||
maxTokens,
|
||||
|
Loading…
Reference in New Issue
Block a user