forked from Archives/langchain
e455ba4ed5
# Add async support for (LLM) routing chains <!-- Thank you for contributing to LangChain! Your PR will appear in our release under the title you set. Please make sure it highlights your valuable contribution. Replace this with a description of the change, the issue it fixes (if applicable), and relevant context. List any dependencies required for this change. After you're done, someone will review your PR. They may suggest improvements. If no one reviews your PR within a few days, feel free to @-mention the same people again, as notifications can get lost. --> <!-- Remove if not applicable --> Add asynchronous LLM calls support for the routing chains. More specifically: - Add async `aroute` function (i.e. async version of `route`) to the `RouterChain` which calls the routing LLM asynchronously - Implement the async `_acall` for the `LLMRouterChain` - Implement the async `_acall` function for `MultiRouteChain` which first calls asynchronously the routing chain with its new `aroute` function, and then calls asynchronously the relevant destination chain. <!-- If you're adding a new integration, please include: 1. a test for the integration - favor unit tests that does not rely on network access. 2. an example notebook showing its use See contribution guidelines for more information on how to write tests, lint etc: https://github.com/hwchase17/langchain/blob/master/.github/CONTRIBUTING.md --> ## Who can review? - @agola11 <!-- For a quicker response, figure out the right person to tag with @ @hwchase17 - project lead Async - @agola11 --> |
||
---|---|---|
.. | ||
agents | ||
callbacks | ||
chains | ||
chat_models | ||
cli | ||
client | ||
docstore | ||
document_loaders | ||
embeddings | ||
evaluation | ||
experimental | ||
graphs | ||
indexes | ||
llms | ||
memory | ||
output_parsers | ||
prompts | ||
retrievers | ||
tools | ||
utilities | ||
vectorstores | ||
__init__.py | ||
base_language.py | ||
cache.py | ||
docker-compose.yaml | ||
document_transformers.py | ||
env.py | ||
example_generator.py | ||
formatting.py | ||
input.py | ||
math_utils.py | ||
model_laboratory.py | ||
py.typed | ||
python.py | ||
requests.py | ||
schema.py | ||
serpapi.py | ||
server.py | ||
sql_database.py | ||
text_splitter.py | ||
utils.py |