Add openai compatible provider

This commit is contained in:
Saoud Rizwan
2024-09-03 17:08:29 -04:00
parent 0badfa2706
commit c209198b23
14 changed files with 383 additions and 187 deletions

View File

@@ -31,9 +31,13 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode
setState(message.state)
const config = message.state?.apiConfiguration
const hasKey = config
? [config.apiKey, config.openRouterApiKey, config.awsRegion, config.vertexProjectId].some(
(key) => key !== undefined
)
? [
config.apiKey,
config.openRouterApiKey,
config.awsRegion,
config.vertexProjectId,
config.openAiApiKey,
].some((key) => key !== undefined)
: false
setShowWelcome(!hasKey)
setDidHydrateState(true)