-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
community: Cap AzureOpenAIEmbeddings chunk_size at 2048 instead of 16. #25852
community: Cap AzureOpenAIEmbeddings chunk_size at 2048 instead of 16. #25852
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
166ebe7
to
94479f4
Compare
94479f4
to
c7eba14
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @kyle-winkelman. Both of these classes are deprecated in favor of implementations in the langchain-openai
package (you should be seeing deprecation warnings directing you to those packages). The default chunk_size
in AzureOpenAIEmbeddings is currently 2048.
@ccurme, what about this https://github.com/langchain-ai/langchain/blob/v0.1.16/libs/partners/openai/langchain_openai/embeddings/base.py#L194? I believe that it should be removed because it is useless code considering a |
) **Description:** [This portion of code](https://github.com/langchain-ai/langchain/blob/v0.1.16/libs/partners/openai/langchain_openai/embeddings/base.py#L189-L196) has no use as a couple lines later a [`ValueError` is thrown](https://github.com/langchain-ai/langchain/blob/v0.1.16/libs/partners/openai/langchain_openai/embeddings/base.py#L209-L213). **Issue:** A follow up to #25852.
Description: Within AzureOpenAIEmbeddings there is a validation to cap
chunk_size
at 16. The value of 16 is either an old limitation or was erroneously chosen. I have checked all of thepreview
andstable
releases to ensure that theembeddings
endpoint can handle 2048 entries Azure/azure-rest-api-specs. I have also found many locations that confirm this limit should be 2048:Issue: fixes #25462