mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-15 09:32:22 +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