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)
2023-02-07 21:21:57 -08:00
..
agents Pass kwargs from initialize_agent into agent classmethod (#799) 2023-01-30 14:54:09 -08:00
callbacks Suggestions for better debugging (#765) 2023-01-28 08:05:20 -08:00
chains Add asyncio support for LLM (OpenAI), Chain (LLMChain, LLMMathChain), and Agent (#841) 2023-02-07 21:21:57 -08:00
data Prompt from file proof of concept using plain text (#127) 2022-11-13 13:15:30 -08:00
docstore wip: add method for both docstore and embeddings (#119) 2022-11-20 16:23:58 -08:00
llms Fix sqlalchemy warnings when running tests (#733) 2023-01-25 07:14:07 -08:00
prompts Harrison/prompt template prefix (#888) 2023-02-06 19:09:28 -08:00
utilities Centralize logic for loading from LangChainHub, add ability to pin dependencies (#805) 2023-01-30 14:52:17 -08:00
__init__.py initial commit 2022-10-24 14:51:15 -07:00
test_bash.py Optionally return shell output on incorrect command (#894) (#899) 2023-02-06 12:46:16 -08:00
test_formatting.py initial commit 2022-10-24 14:51:15 -07:00
test_python.py Harrison/tools exp (#372) 2022-12-18 21:51:23 -05:00
test_sql_database_schema.py Fix sqlalchemy warnings when running tests (#733) 2023-01-25 07:14:07 -08:00
test_sql_database.py Harrison/sql rows (#915) 2023-02-06 18:56:18 -08:00
test_text_splitter.py Harrison/fix splitting (#563) 2023-01-08 19:19:32 -08:00