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/integration_tests/llms
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
..
__init__.py initial commit 2 years ago
test_ai21.py Harrison/cohere experimental (#638) 1 year ago
test_anthropic.py Harrison/athropic (#921) 1 year ago
test_cohere.py Harrison/llm saving (#331) 1 year ago
test_huggingface_endpoint.py Harrison/inference endpoint (#861) 1 year ago
test_huggingface_hub.py Harrison/llm saving (#331) 1 year ago
test_huggingface_pipeline.py Harrison/version 0040 (#366) 1 year ago
test_manifest.py Harrison/fix lint (#138) 2 years ago
test_nlpcloud.py Harrison/llm saving (#331) 1 year ago
test_openai.py Add asyncio support for LLM (OpenAI), Chain (LLMChain, LLMMathChain), and Agent (#841) 1 year ago
utils.py Harrison/improve cache (#368) 1 year ago