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/chains
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
..
api Serialize all the chains! (#761) 1 year ago
chat_vector_db chat vector db chain (#902) 1 year ago
combine_documents analyze document (#731) 1 year ago
conversation remove unused buffer (#919) 1 year ago
hyde Serialize all the chains! (#761) 1 year ago
llm_bash Serialize all the chains! (#761) 1 year ago
llm_checker Serialize all the chains! (#761) 1 year ago
llm_math Add asyncio support for LLM (OpenAI), Chain (LLMChain, LLMMathChain), and Agent (#841) 1 year ago
natbot Fix typo in crawler.py (#842) 1 year ago
pal return code for pal (#844) 1 year ago
qa_with_sources Serialize all the chains! (#761) 1 year ago
question_answering map rerank chain (#516) 1 year ago
sql_database Correct prompt typo + update example for SQLDatabaseChain (#868) 1 year ago
summarize Prompt fix for empty intermediate steps in summarization (#660) 1 year ago
vector_db_qa enable mmr search (#807) 1 year ago
__init__.py analyze document (#731) 1 year ago
base.py Add asyncio support for LLM (OpenAI), Chain (LLMChain, LLMMathChain), and Agent (#841) 1 year ago
llm.py Add asyncio support for LLM (OpenAI), Chain (LLMChain, LLMMathChain), and Agent (#841) 1 year ago
llm_requests.py Serialize all the chains! (#761) 1 year ago
loading.py pass kwargs through to loading (#863) 1 year ago
mapreduce.py Harrison/return intermediate steps (#428) 1 year ago
moderation.py add moderation chain (#299) 1 year ago
sequential.py verbose flag (#683) 1 year ago
transform.py Add a Transformation Chain (#257) 2 years ago