You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
langchain/langchain/agents
Ankush Gola bc7e56e8df
Add asyncio support for LLM (OpenAI), Chain (LLMChain, LLMMathChain), and Agent (#841)
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)
1 year ago
..
conversational conversational agent fix (#818) 1 year ago
mrkl Get elements of ActionInput on newlines (#889) 1 year ago
react (wip) Harrison/serialize agents (#725) 1 year ago
self_ask_with_search (wip) Harrison/serialize agents (#725) 1 year ago
__init__.py Harrison/tool decorator (#790) 1 year ago
agent.py Add asyncio support for LLM (OpenAI), Chain (LLMChain, LLMMathChain), and Agent (#841) 1 year ago
initialize.py Pass kwargs from initialize_agent into agent classmethod (#799) 1 year ago
load_tools.py Add asyncio support for LLM (OpenAI), Chain (LLMChain, LLMMathChain), and Agent (#841) 1 year ago
loading.py Centralize logic for loading from LangChainHub, add ability to pin dependencies (#805) 1 year ago
tools.py Add asyncio support for LLM (OpenAI), Chain (LLMChain, LLMMathChain), and Agent (#841) 1 year ago