mirror of https://github.com/hwchase17/langchain
BUG: Limit Azure OpenAI embeddings chunk size (#13425)
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 @hwchase17pull/13588/head
parent
e53f59f01a
commit
6bf9b2cb51
Loading…
Reference in New Issue