diff --git a/client/src/components/Input/OpenAIOptions/Settings.jsx b/client/src/components/Input/OpenAIOptions/Settings.jsx index b72b861463..8f45b07e93 100644 --- a/client/src/components/Input/OpenAIOptions/Settings.jsx +++ b/client/src/components/Input/OpenAIOptions/Settings.jsx @@ -79,13 +79,13 @@ function Settings(props) { htmlFor="chatGptLabel" className="text-left text-sm font-medium" > - Custom Name + Custom Name (default: blank) setChatGptLabel(e.target.value)} + onChange={e => setChatGptLabel(e.target.value || null)} placeholder="Set a custom name for ChatGPT" className={cn( defaultTextProps, @@ -98,12 +98,12 @@ function Settings(props) { htmlFor="promptPrefix" className="text-left text-sm font-medium" > - Prompt Prefix + Prompt Prefix (default: blank) setPromptPrefix(e.target.value)} + value={promptPrefix || ''} + onChange={e => setPromptPrefix(e.target.value || null)} placeholder="Set custom instructions. Defaults to: 'You are ChatGPT, a large language model trained by OpenAI.'" className={cn( defaultTextProps, @@ -129,7 +129,7 @@ function Settings(props) { htmlFor="chatGptLabel" className="text-left text-sm font-medium" > - Temperature + Temperature (default: 1) setTemperature(value)} + onValueChange={value => setTemperature(value[0])} max={2} min={0} step={0.01} @@ -177,7 +177,7 @@ function Settings(props) { setMaxTokens(value)} + onValueChange={value => setMaxTokens(value[0])} max={2048} // should be dynamic to the currently selected model min={1} step={1} @@ -197,7 +197,7 @@ function Settings(props) { htmlFor="chatGptLabel" className="text-left text-sm font-medium" > - Top P + Top P (default: 1) setTopP(value)} + onValueChange={value => setTopP(value[0])} max={1} min={0} step={0.01} @@ -231,7 +231,7 @@ function Settings(props) { htmlFor="chatGptLabel" className="text-left text-sm font-medium" > - Frequency Penalty + Frequency Penalty (default: 0) setFreqP(value)} + onValueChange={value => setFreqP(value[0])} max={2} min={-2} step={0.01} @@ -265,7 +265,7 @@ function Settings(props) { htmlFor="chatGptLabel" className="text-left text-sm font-medium" > - Presence Penalty + Presence Penalty (default: 0) setPresP(value)} + onValueChange={value => setPresP(value[0])} max={2} min={-2} step={0.01}