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/tests/unit_tests
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
..
agents Pass kwargs from initialize_agent into agent classmethod (#799) 1 year ago
callbacks Suggestions for better debugging (#765) 1 year ago
chains Add asyncio support for LLM (OpenAI), Chain (LLMChain, LLMMathChain), and Agent (#841) 1 year ago
data Prompt from file proof of concept using plain text (#127) 2 years ago
docstore wip: add method for both docstore and embeddings (#119) 2 years ago
llms Fix sqlalchemy warnings when running tests (#733) 1 year ago
prompts Harrison/prompt template prefix (#888) 1 year ago
utilities Centralize logic for loading from LangChainHub, add ability to pin dependencies (#805) 1 year ago
__init__.py initial commit 2 years ago
test_bash.py Optionally return shell output on incorrect command (#894) (#899) 1 year ago
test_formatting.py initial commit 2 years ago
test_python.py Harrison/tools exp (#372) 1 year ago
test_sql_database.py Harrison/sql rows (#915) 1 year ago
test_sql_database_schema.py Fix sqlalchemy warnings when running tests (#733) 1 year ago
test_text_splitter.py Harrison/fix splitting (#563) 1 year ago