Replies: 4 comments 12 replies
-
For now we had to update /env/lib/python3.10/site-packages/langchain/embeddings/openai.py directly to retry embedding generation for the erroneous chunk inside _get_len_safe_embeddings(). |
Beta Was this translation helpful? Give feedback.
-
Any official fix/workaround for that? I'm having the same issue. |
Beta Was this translation helpful? Give feedback.
-
for me, updating the langchain version solve this problem. |
Beta Was this translation helpful? Give feedback.
-
The retry didn't work for me unless i set the chunk size in the low 00s. And I had to do the hardcode the fix. Talking about a few versions ago. The trouble is that, with chunk sizes in the 000s, there are almost always empty embeddings returned from opeanai. So it's pointless to retry 6 times, it always fails. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm trying to use Langchain to create a vectorstore from scraped HTML pages, but I encountered an issue where I'm getting embeddings of length 1 when it should be 1536 per https://platform.openai.com/docs/guides/embeddings.
Here's how my code looks:
On the last line, I'm getting the below error:
After some investigation, I found that the problem is due to getting the following erroneous embeddings:
As you can see, the embedding returned has length 1 instead of a real embedding with length 1536.
Does anyone know how to resolve this issue? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions