A Python library for making asynchronous LLM calls
Project description
async-llms: A Python Library for Asynchronous LLM Calls
async-llms is a Python library for making asynchronous LLM calls to accelerate LLM evaluation experiments.
Installation
You can install the package using pip:
pip install async-llms
Usage
Set API Key
export OPENAI_API_KEY="your_api_key"
Command Line Interface
You can use the package directly from the command line:
async-llms \
--api_type "openai" \
--input_jsonl "path/to/input.jsonl" \
--output_jsonl "path/to/output.jsonl" \
--num_parallel_tasks "num_parallel_tasks"
Input Format
The input JSONL file format is identical to the one used in OpenAI's Batch API: https://platform.openai.com/docs/guides/batch
{
"custom_id": "unique_id_for_this_request",
"body": {
// Your LLM request parameters here
}
}
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file async_llms-0.1.1.tar.gz.
File metadata
- Download URL: async_llms-0.1.1.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23dd2ec35ab3f0026da2e97089b4c3ed40807159bab421630da0af5387f43ab8
|
|
| MD5 |
e056fff4ba8b55329b945081b6e1cecf
|
|
| BLAKE2b-256 |
68055974acbd4f38a2e343c9fbcc2de36d91c916c7840fa7412b30e7e76ac091
|
File details
Details for the file async_llms-0.1.1-py3-none-any.whl.
File metadata
- Download URL: async_llms-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c9cb9832c82b028fff56491e17dbb5eab2717cba24d1ed19cf4b57543398f5a
|
|
| MD5 |
877f6ea086c449e1c90212006048e7a2
|
|
| BLAKE2b-256 |
19d38adb9a9b8be88bcfba54d09f46e1f06a804002ee3c130a3558352a29d737
|