allow filling in the API Key of CustomModel mode (#561, previously designed for local offline model or custom server, now you can also use it for regular openai API calls and freely fill in the model name(#563))

This commit is contained in:
josc146
2023-11-13 13:42:46 +08:00
parent 946cadc51d
commit d0fbc9fecb
4 changed files with 29 additions and 6 deletions
+11
View File
@@ -285,6 +285,17 @@ export function GeneralPart({ config, updateConfig }) {
}}
/>
)}
{isUsingCustomModel(config) && (
<input
type="password"
value={config.customApiKey}
placeholder={t('API Key')}
onChange={(e) => {
const apiKey = e.target.value
updateConfig({ customApiKey: apiKey })
}}
/>
)}
{isUsingAzureOpenAi(config) && (
<input
type="password"