File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -254,13 +254,15 @@ const Config = function () {
254254 label = { t ( "API Base of OpenAI" ) }
255255 withAsterisk
256256 description = { t ( "the base URL for the API" ) }
257+ { ...form . getInputProps ( "providers.openai.api_base" ) }
257258 />
258259 < PasswordInput
259260 styles = { commonInputStyle }
260261 withAsterisk
261262 label = "Access Key of OpenAI"
262263 placeholder = "Your Access Key"
263264 description = "please keep this secret"
265+ { ...form . getInputProps ( "providers.openai.api_key" ) }
264266 />
265267 </ Stack >
266268 </ Tabs . Panel >
Original file line number Diff line number Diff line change @@ -51,6 +51,12 @@ export const ConfigStore = types
5151 } ;
5252 }
5353 } ) ;
54+ if ( ! newConfig . providers ?. openai ) {
55+ newConfig . providers . openai = {
56+ api_key : "" ,
57+ api_base : "" ,
58+ } ;
59+ }
5460 self . config = newConfig ;
5561 self . settle = true ;
5662 } ,
You can’t perform that action at this time.
0 commit comments