langchain/libs/partners/openai/langchain_openai/embeddings
Chaymae El Aattabi 4b08a7e8e8
Fix #29759: Use local chunk_size_ for looping in embed_documents (#29761)
This fix ensures that the chunk size is correctly determined when
processing text embeddings. Previously, the code did not properly handle
cases where chunk_size was None, potentially leading to incorrect
chunking behavior.

Now, chunk_size_ is explicitly set to either the provided chunk_size or
the default self.chunk_size, ensuring consistent chunking. This update
improves reliability when processing large text inputs in batches and
prevents unintended behavior when chunk_size is not specified.

---------

Co-authored-by: Chester Curme <chester.curme@gmail.com>
2025-02-13 01:28:26 +00:00
..
__init__.py infra: add more formatter rules to openai (#23189) 2024-06-19 11:39:58 -07:00
azure.py Community/Partner: Adding Azure community and partner user agent to better track usage in Python (#29561) 2025-02-07 23:28:30 +00:00
base.py Fix #29759: Use local chunk_size_ for looping in embed_documents (#29761) 2025-02-13 01:28:26 +00:00