mirror of
https://github.com/Mintplex-Labs/langchain-python.git
synced 2026-08-27 01:15:22 -04:00
6bf9b2cb51
Hi! This short PR aims at: * Fixing `OpenAIEmbeddings`' check on `chunk_size` when used with Azure OpenAI (thus with openai < 1.0). Azure OpenAI embeddings support at most 16 chunks per batch, I believe we are supposed to take the min between the passed value/default value and 16, not the max - which, I suppose, was introduced by accident while refactoring the previous version of this check from this other PR of mine: #10707 * Porting this fix to the newest class (`AzureOpenAIEmbeddings`) for openai >= 1.0 This fixes #13539 (closed but the issue persists). @baskaryan @hwchase17