forked from React-Group/interstellar_ai
Fixed | Change API Keys
This commit is contained in:
parent
d12c850df0
commit
03881dc20f
1 changed files with 8 additions and 4 deletions
|
@ -124,10 +124,10 @@ const Settings: React.FC<{ closeSettings: () => void; accountName: string }> = (
|
||||||
const [selectedTheme, setSelectedTheme] = useState<string>('');
|
const [selectedTheme, setSelectedTheme] = useState<string>('');
|
||||||
|
|
||||||
// API Keys
|
// API Keys
|
||||||
const [mistral, setMistral] = useState(() => getComputedStyle(document.documentElement).getPropertyValue('--online-la-plateforme').trim());
|
const [mistral, setMistral] = useState(localStorage.getItem('mistral') || "");
|
||||||
const [openai, setOpenai] = useState(() => getComputedStyle(document.documentElement).getPropertyValue('--online-cheap-openai').trim());
|
const [openai, setOpenai] = useState(localStorage.getItem('openai') || "");
|
||||||
const [anthropic, setAnthropic] = useState(() => getComputedStyle(document.documentElement).getPropertyValue('--online-cheap-anthropic').trim());
|
const [anthropic, setAnthropic] = useState(localStorage.getItem('anthropic') || "");
|
||||||
const [google, setGoogle] = useState(() => getComputedStyle(document.documentElement).getPropertyValue('--online-cheap-google').trim());
|
const [google, setGoogle] = useState(localStorage.getItem('google') || "");
|
||||||
const [myBoolean, setMyBoolean] =useState<boolean | any>(() => getItemFromLocalStorage('myBoolean'));
|
const [myBoolean, setMyBoolean] =useState<boolean | any>(() => getItemFromLocalStorage('myBoolean'));
|
||||||
|
|
||||||
const settings = {
|
const settings = {
|
||||||
|
@ -624,24 +624,28 @@ const Settings: React.FC<{ closeSettings: () => void; accountName: string }> = (
|
||||||
value={mistral} // State variable for the input
|
value={mistral} // State variable for the input
|
||||||
setValue={setMistral} // State updater function
|
setValue={setMistral} // State updater function
|
||||||
type="text" // Input type
|
type="text" // Input type
|
||||||
|
placeholder={localStorage.getItem('mistral') || "Enter the API key"}
|
||||||
/>
|
/>
|
||||||
<TextSettings
|
<TextSettings
|
||||||
label="OpenAI" // Label for the input
|
label="OpenAI" // Label for the input
|
||||||
value={openai} // State variable for the input
|
value={openai} // State variable for the input
|
||||||
setValue={setOpenai} // State updater function
|
setValue={setOpenai} // State updater function
|
||||||
type="text" // Input type
|
type="text" // Input type
|
||||||
|
placeholder={localStorage.getItem('openai') || "Enter the API key"}
|
||||||
/>
|
/>
|
||||||
<TextSettings
|
<TextSettings
|
||||||
label="Anthropic" // Label for the input
|
label="Anthropic" // Label for the input
|
||||||
value={anthropic} // State variable for the input
|
value={anthropic} // State variable for the input
|
||||||
setValue={setAnthropic} // State updater function
|
setValue={setAnthropic} // State updater function
|
||||||
type="text" // Input type
|
type="text" // Input type
|
||||||
|
placeholder={localStorage.getItem('anthropic') || "Enter the API key"}
|
||||||
/>
|
/>
|
||||||
<TextSettings
|
<TextSettings
|
||||||
label="Google" // Label for the input
|
label="Google" // Label for the input
|
||||||
value={google} // State variable for the input
|
value={google} // State variable for the input
|
||||||
setValue={setGoogle} // State updater function
|
setValue={setGoogle} // State updater function
|
||||||
type="text" // Input type
|
type="text" // Input type
|
||||||
|
placeholder={localStorage.getItem('google') || "Enter the API key"}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue