🪙 fix(getModelMaxTokens): Retrieve Correct Context Tokens for Azure OpenAI (#1710)

This commit is contained in:
Danny Avila 2024-02-02 23:53:50 -05:00 committed by GitHub
parent 296967eff0
commit 7934cc5ec4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 65 additions and 1 deletions

View file

@ -81,7 +81,8 @@ const anthropicModels = {
// Order is important here: by model series and context size (gpt-4 then gpt-3, ascending)
const maxTokensMap = {
[EModelEndpoint.openAI]: openAIModels,
[EModelEndpoint.azureOpenAI]: openAIModels,
[EModelEndpoint.openAI]: { ...openAIModels, ...googleModels, ...anthropicModels },
[EModelEndpoint.custom]: { ...openAIModels, ...googleModels, ...anthropicModels },
[EModelEndpoint.google]: googleModels,
[EModelEndpoint.anthropic]: anthropicModels,