feat(custom-openai): temperature
This commit is contained in:
parent
446adbef3f
commit
98c185c12e
10 changed files with 51 additions and 6 deletions
|
|
@ -23,6 +23,7 @@ interface SettingsType {
|
|||
customOpenaiApiKey: string;
|
||||
customOpenaiApiUrl: string;
|
||||
customOpenaiModelName: string;
|
||||
customOpenaiTemperature: number;
|
||||
}
|
||||
|
||||
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
||||
|
|
@ -576,6 +577,32 @@ const Page = () => {
|
|||
}
|
||||
/>
|
||||
</div>
|
||||
<div className="flex flex-col space-y-1">
|
||||
<p className="text-black/70 dark:text-white/70 text-sm">
|
||||
Temperature
|
||||
</p>
|
||||
<Input
|
||||
type="number"
|
||||
min={0}
|
||||
step={0.1}
|
||||
max={1}
|
||||
placeholder="Temperature"
|
||||
value={config.customOpenaiTemperature}
|
||||
isSaving={savingStates['customOpenaiTemperature']}
|
||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
setConfig((prev) => ({
|
||||
...prev!,
|
||||
customOpenaiTemperature: parseInt(
|
||||
e.target.value,
|
||||
10,
|
||||
),
|
||||
}));
|
||||
}}
|
||||
onSave={(value) =>
|
||||
saveConfig('customOpenaiTemperature', value)
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
<div className="flex flex-col space-y-1">
|
||||
<p className="text-black/70 dark:text-white/70 text-sm">
|
||||
Custom OpenAI API Key
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue