-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
[Bug]: OpenAIEmbeddings is broken in 0.10.6 #10977
Comments
🤖 Hey @david1542! Great to see you back. Running into some turbulence with OpenAIEmbeddings, huh? Let's see what we can do about that. Thank you for reporting this issue. It seems like you're encountering a problem with the This issue seems similar to a previously resolved issue: [Bug]: ValueError: "HuggingFaceEmbeddings" object has no field "callback_manager". In that case, the solution was to wrap the LLM class with the The As a workaround, you might want to try creating a new instance of I'm sorry for the inconvenience this issue is causing you. I'll forward this to the development team so they can investigate further. In the meantime, if you have any other questions or need further clarification, please don't hesitate to ask. Sources
|
What is This works for me >>> from llama_index.embeddings.openai import OpenAIEmbedding
>>> from llama_index.core import Document, VectorStoreIndex
>>> embed_model = OpenAIEmbedding(model="text-embedding-3-large", dimensions=768)
>>> index = VectorStoreIndex.from_documents([Document.example()], embed_model=embed_model) |
I’m also facing issues with OpenAIEmbedding. Getting a connection error every time. Increasing the timeout doesn’t seem to have any effect. Follow the code below to replicate.
|
@fearfulsteel420 Any details on the connection error? I cannot replicate
|
@logan-markewich Apologies. Looks like I was declaring the OPENAI_API_KEY env variable incorrectly. Seems to work fine now. However, if my declaration is being done incorrectly, shouldn’t i be getting a different error message. All I was getting is the following WARNING message
followed by this error:
This is how I was incorrectly declaring the env variable:
Forgive my rookie mistake again |
Probably we could catch this and give a more informative error. A PR for another day :) Glad it works! |
@logan-markewich Thank you so much. Seems like I imported |
Glad we got that cleared up! |
Hi, I am facing the same issue. Tried multiple options, ranging from charging the definition of how to declare the key to using a new key , still the issue persists. What am I missing ? |
Bug Description
Hey everyone :)
I'm trying to store & embed some documents using OpenAI embeddings but the process seems to crash due to an illegal assignment to the embed_model object.
This is what I'm trying to do in my code (llama-index==0.10.6):
The error I'm seeing:
It seems to be a bug in the
resolve_embed_model
function. Can anyone verify that?Version
0.10.6
Steps to Reproduce
Use OpenAIEmbeddings like in the example I provided and it should crash 🐵
Relevant Logs/Tracbacks
The text was updated successfully, but these errors were encountered: