mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-21 06:14:37 +00:00
Supporting asyncio in langchain primitives allows for users to run them concurrently and creates more seamless integration with asyncio-supported frameworks (FastAPI, etc.) Summary of changes: **LLM** * Add `agenerate` and `_agenerate` * Implement in OpenAI by leveraging `client.Completions.acreate` **Chain** * Add `arun`, `acall`, `_acall` * Implement them in `LLMChain` and `LLMMathChain` for now **Agent** * Refactor and leverage async chain and llm methods * Add ability for `Tools` to contain async coroutine * Implement async SerpaPI `arun` Create demo notebook. Open questions: * Should all the async stuff go in separate classes? I've seen both patterns (keeping the same class and having async and sync methods vs. having class separation) |
||
---|---|---|
.. | ||
__init__.py | ||
test_ai21.py | ||
test_anthropic.py | ||
test_cohere.py | ||
test_huggingface_endpoint.py | ||
test_huggingface_hub.py | ||
test_huggingface_pipeline.py | ||
test_manifest.py | ||
test_nlpcloud.py | ||
test_openai.py | ||
utils.py |