diff --git a/app/client/api.ts b/app/client/api.ts index 896880fa3f6..41ccbd8e1c0 100644 --- a/app/client/api.ts +++ b/app/client/api.ts @@ -162,7 +162,7 @@ export function getHeaders() { Accept: "application/json", }; const modelConfig = useChatStore.getState().currentSession().mask.modelConfig; - const isGoogle = modelConfig.providerName == ServiceProvider.Azure; + const isGoogle = modelConfig.providerName == ServiceProvider.Google; const isAzure = modelConfig.providerName === ServiceProvider.Azure; const isAnthropic = modelConfig.providerName === ServiceProvider.Anthropic; const authHeader = isAzure diff --git a/app/client/platforms/openai.ts b/app/client/platforms/openai.ts index c9c834b6691..7cd5ecbbca0 100644 --- a/app/client/platforms/openai.ts +++ b/app/client/platforms/openai.ts @@ -142,13 +142,12 @@ export class ChatGPTApi implements LLMApi { try { let chatPath = ""; - if (modelConfig.providerName == ServiceProvider.Azure) { + if (modelConfig.providerName === ServiceProvider.Azure) { // find model, and get displayName as deployName const { models: configModels, customModels: configCustomModels } = useAppConfig.getState(); const { defaultModel, customModels: accessCustomModels } = useAccessStore.getState(); - const models = collectModelsWithDefaultModel( configModels, [configCustomModels, accessCustomModels].join(","), @@ -156,8 +155,8 @@ export class ChatGPTApi implements LLMApi { ); const model = models.find( (model) => - model.name == modelConfig.model && - model?.provider?.providerName == ServiceProvider.Azure, + model.name === modelConfig.model && + model?.provider?.providerName === ServiceProvider.Azure, ); chatPath = this.path( Azure.ChatPath( diff --git a/app/constant.ts b/app/constant.ts index cabb5675ece..d44b5b8173b 100644 --- a/app/constant.ts +++ b/app/constant.ts @@ -153,6 +153,7 @@ const openaiModels = [ "gpt-4o-2024-05-13", "gpt-4-vision-preview", "gpt-4-turbo-2024-04-09", + "gpt-4-1106-preview", ]; const googleModels = [