-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for GPT-4o #5346
Labels
auto:bug
Related to a bug, vulnerability, unexpected error with an existing feature
Comments
dosubot
bot
added
the
auto:bug
Related to a bug, vulnerability, unexpected error with an existing feature
label
May 13, 2024
#5354 |
This is not yet solved. Here's my langchain packages.
|
NEED THE UPDATE TO BE RELEASED........ |
@jacoblee93 Any ETA on the new release? |
Hey the fix should be live if you update to the latest @langchain/core! The tiktoken dep is there. |
Hi, Now, It's working for me! Thanks! |
Thank you, it works now! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
Failed to calculate number of tokens, falling back to approximate count Error: Unknown model
at getEncodingNameForModel (file:///node_modules/js-tiktoken/dist/chunk-HXW345QN.js:224:13)
at encodingForModel (file:///node_modules/@langchain/core/dist/utils/tiktoken.js:19:24)
at ChatOpenAI.getNumTokens (file:///node_modules/@langchain/core/dist/language_models/base.js:174:40)
at file:///node_modules/@langchain/openai/dist/chat_models.js:642:42
at Array.map ()
at ChatOpenAI.getNumTokensFromMessages (file:///node_modules/@langchain/openai/dist/chat_models.js:641:60)
at ChatOpenAI.getEstimatedTokenCountFromPrompt (file:///node_modules/@langchain/openai/dist/chat_models.js:589:34)
at ChatOpenAI._generate (file:///node_modules/@langchain/openai/dist/chat_models.js:536:49)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Promise.allSettled (index 0)
Failed to calculate number of tokens, falling back to approximate count Error: Unknown model
at getEncodingNameForModel (file:///node_modules/js-tiktoken/dist/chunk-HXW345QN.js:224:13)
at encodingForModel (file:///node_modules/@langchain/core/dist/utils/tiktoken.js:19:24)
at ChatOpenAI.getNumTokens (file:///node_modules/@langchain/core/dist/language_models/base.js:174:40)
at file:///node_modules/@langchain/openai/dist/chat_models.js:643:42
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Promise.all (index 0)
at async ChatOpenAI.getNumTokensFromMessages (file:///node_modules/@langchain/openai/dist/chat_models.js:641:33)
at async ChatOpenAI.getEstimatedTokenCountFromPrompt (file:///node_modules/@langchain/openai/dist/chat_models.js:589:23)
at async ChatOpenAI._generate (file:///node_modules/@langchain/openai/dist/chat_models.js:536:38)
at async Promise.allSettled (index 0)
Failed to calculate number of tokens, falling back to approximate count Error: Unknown model
at getEncodingNameForModel (file:///node_modules/js-tiktoken/dist/chunk-HXW345QN.js:224:13)
at encodingForModel (file:///node_modules/@langchain/core/dist/utils/tiktoken.js:19:24)
at ChatOpenAI.getNumTokens (file:///node_modules/@langchain/core/dist/language_models/base.js:174:40)
at file:///node_modules/@langchain/openai/dist/chat_models.js:623:35
at Array.map ()
at ChatOpenAI.getNumTokensFromGenerations (file:///node_modules/@langchain/openai/dist/chat_models.js:617:64)
at ChatOpenAI._generate (file:///node_modules/@langchain/openai/dist/chat_models.js:537:53)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Promise.allSettled (index 0)
at async ChatOpenAI._generateUncached (file:///node_modules/@langchain/core/dist/language_models/chat_models.js:114:25)
Description
Hi, OpenAI just released GPT-4o and langchain needs to be updated to support this model. At the moment, it throws the above error when using the new model.
System Info
Langchain: 0.1.37
Platform: macos
Node: 21.7.3
Yarn: 4.2.2
The text was updated successfully, but these errors were encountered: