mirror of
https://github.com/hwchase17/langchain
synced 2024-11-06 03:20:49 +00:00
c6660df58e
**Description** The DoctranTextTranslator has an async transform function that was not implemented because [the doctran library](https://github.com/psychic-api/doctran) uses a sync version of the `execute` method. - I implemented the `DoctranTextTranslator.atransform_documents()` method using `asyncio.to_thread` to run the function in a separate thread. - I updated the example in the Notebook with the new async version. - The performance improvements can be appreciated when a big document is divided into multiple chunks. Relates to: - Issue #14645: https://github.com/langchain-ai/langchain/issues/14645 - Issue #14437: https://github.com/langchain-ai/langchain/issues/14437 - https://github.com/langchain-ai/langchain/pull/15264 --------- Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com> |
||
---|---|---|
.. | ||
xsl | ||
__init__.py | ||
beautiful_soup_transformer.py | ||
doctran_text_extract.py | ||
doctran_text_qa.py | ||
doctran_text_translate.py | ||
embeddings_redundant_filter.py | ||
google_translate.py | ||
html2text.py | ||
long_context_reorder.py | ||
markdownify.py | ||
nuclia_text_transform.py | ||
openai_functions.py |