-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
ValueError: Unknown encoding text-embedding-ada-002 #6726
Comments
Answer generated by a 🤖 AnswerTo fix the pip install --upgrade tiktoken After upgrading from langchain.embeddings import OpenAIEmbeddings
embedding_model = OpenAIEmbeddings()
embeddings = embedding_model.embed_documents(
[
"Hi there!",
"Oh, hello!",
"What's your name?",
"My friends call me World",
"Hello World!"
]
) This should resolve the Sources
This response is meant to be useful, save you time, and share context. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. |
I have followed your instructions, but the problem still persists. @hwchase17
after update tiktoken
|
is there anybody can give a help? |
Hi, @heavenkiller2018! I'm Dosu, and I'm here to help the LangChain team manage our backlog. I wanted to let you know that we are marking this issue as stale. From what I understand, you reported a Before we close this issue, we wanted to check with you if it is still relevant to the latest version of the LangChain repository. If it is, please let us know by commenting on this issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days. Thank you for your understanding, and we appreciate your contribution to the LangChain project! |
I'm having the same problem following the code in langchain documentation. I have updated tiktoken to the latest version (0.5.2). Does anyone solve this issue? |
I have the same issue, but my scenario is different. Unknown encoding text-embedding-ada-002. Plugins found: ['tiktoken_ext.openai_public'] |
System Info
no
Who can help?
@hwchase17 @agola11
Information
Related Components
Reproduction
when running the following code:
such errors occurred:
how to fix it?
Expected behavior
no
The text was updated successfully, but these errors were encountered: