Skip to main content

OpenaiBatchAPI: A Python Library that support OpenAI Batch API

Project description

OpenaiBatchAPI: A Python Library that support OpenAI Batch API

OpenAI Batch API

Installation

You can install this package from PyPI using pip:

$ pip install OpenaiBatchAPI

Example

#!/usr/bin/python
# -*- coding: utf-8 -*-
from batch_api import OpenaiBatchAPI

batch_client = OpenaiBatchAPI(api_key = "YOUR_KEY")

messages = [[
    {
        "role": "user",
        "content": "HI"
    }
]] * 23

batchs = batch_api.batchs_completion(messages)

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

OpenaiBatchAPI-1.0-py2.py3-none-any.whl (4.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file OpenaiBatchAPI-1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: OpenaiBatchAPI-1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for OpenaiBatchAPI-1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ac761ebd170361adec43e996b8c2a78e0e881a397606baf8febb2f66d75b8e2c
MD5 951b05de88264976af9af36dabdc4fe2
BLAKE2b-256 f97cebd9589cc4a2b801cdad4a181ad2263762520cfa3f29d2b6f390a4a5a81e

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