+ {checking ? (
+
+
+ Checking provider setup...
+
+ ) : null}
+
+
+
Provider
+
+ {providerOptions.map(option => (
+
{
+ setSelectedKey(option.key)
+ setValue('')
+ }}
+ type="button"
+ >
+
+ {optionLabel(option, envVars?.[option.key])}
+ {selectedKey === option.key ? : null}
+
+ {option.helper}
+
+ ))}
+
+
+
+
+
+
+ {selectedKey}
+
+ {selectedInfo?.url ? (
+
+
+ Docs
+
+
+
+ ) : null}
+
+
setValue(event.target.value)}
+ onKeyDown={event => {
+ if (event.key === 'Enter') {
+ void handleSave()
+ }
+ }}
+ placeholder={selectedKey === 'OPENAI_BASE_URL' ? 'http://127.0.0.1:8000/v1' : 'Paste API key'}
+ type={selectedInfo?.is_password === false || selectedKey === 'OPENAI_BASE_URL' ? 'text' : 'password'}
+ value={value}
+ />
+
{selectedOption.helper}
+
+
+ {error ? (
+
+ ) : null}
+
+
+
+
+ Open full settings
+
+
+
+ Configure later
+
+ void handleSave()}>
+ {saving ? : }
+ {saving ? 'Saving' : 'Save and continue'}
+
+
+
+