Skip to main content

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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

async_llms-0.1.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

async_llms-0.1.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file async_llms-0.1.0.tar.gz.

File metadata

  • Download URL: async_llms-0.1.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for async_llms-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3419761c3b25d9439105bf03f9ff5565a0197ea0154596d1f57cedefbbba365b
MD5 1180f95757261e27dcc9b6a2f9d680b1
BLAKE2b-256 dfdf768f5d277cbcf021c951fb5f98522cd43086945836ac41a11bc38e1cde04

See more details on using hashes here.

File details

Details for the file async_llms-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: async_llms-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for async_llms-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8a4e9801a802c7b95271f37975bf1804ca9795f02786d6a32324b0086dbc627d
MD5 348215cc93b0c56c36f5769c686e0ac7
BLAKE2b-256 3b2017d8b80a7b3243c0e3cdcce13a53bcc392188d83989ced6867d7aad5360c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page