mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2025-05-02 01:02:45 +00:00
feat(custom-openai): save live changes
This commit is contained in:
@ -563,12 +563,16 @@ const Page = () => {
|
|||||||
<Input
|
<Input
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="Model name"
|
placeholder="Model name"
|
||||||
defaultValue={config.customOpenaiModelName}
|
value={config.customOpenaiModelName}
|
||||||
onChange={(e) =>
|
isSaving={savingStates['customOpenaiModelName']}
|
||||||
setConfig({
|
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
...config,
|
setConfig((prev) => ({
|
||||||
|
...prev!,
|
||||||
customOpenaiModelName: e.target.value,
|
customOpenaiModelName: e.target.value,
|
||||||
})
|
}));
|
||||||
|
}}
|
||||||
|
onSave={(value) =>
|
||||||
|
saveConfig('customOpenaiModelName', value)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -579,12 +583,16 @@ const Page = () => {
|
|||||||
<Input
|
<Input
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="Custom OpenAI API Key"
|
placeholder="Custom OpenAI API Key"
|
||||||
defaultValue={config.customOpenaiApiKey}
|
value={config.customOpenaiApiKey}
|
||||||
onChange={(e) =>
|
isSaving={savingStates['customOpenaiApiKey']}
|
||||||
setConfig({
|
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
...config,
|
setConfig((prev) => ({
|
||||||
|
...prev!,
|
||||||
customOpenaiApiKey: e.target.value,
|
customOpenaiApiKey: e.target.value,
|
||||||
})
|
}));
|
||||||
|
}}
|
||||||
|
onSave={(value) =>
|
||||||
|
saveConfig('customOpenaiApiKey', value)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -595,12 +603,16 @@ const Page = () => {
|
|||||||
<Input
|
<Input
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="Custom OpenAI Base URL"
|
placeholder="Custom OpenAI Base URL"
|
||||||
defaultValue={config.customOpenaiApiUrl}
|
value={config.customOpenaiApiUrl}
|
||||||
onChange={(e) =>
|
isSaving={savingStates['customOpenaiApiUrl']}
|
||||||
setConfig({
|
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
...config,
|
setConfig((prev) => ({
|
||||||
|
...prev!,
|
||||||
customOpenaiApiUrl: e.target.value,
|
customOpenaiApiUrl: e.target.value,
|
||||||
})
|
}));
|
||||||
|
}}
|
||||||
|
onSave={(value) =>
|
||||||
|
saveConfig('customOpenaiApiUrl', value)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user