Skip to main content

Polling OpenAI API without rate limit issues.

Project description

OpenAI-API-Polling

PyPI version PyPI Downloads

Polling OpenAI API without rate limit issues.

Quickly Start

You can use pip to install this package.

pip install openai-api-polling

A simple example:

from openai_api_polling.polling import ClientPolling

api_keys = [
    "<your api key a>", 
    "<your api key> b",
    "<your api key> c",
]
client_polling = ClientPolling(api_keys=api_keys)

for _ in range(10):
    resp = client_polling.client.chat.completions.create(
        model="gpt-4",
        messages=[
            {"role": "system", "content": "You are a helpful assistant."},
            {"role": "user", "content": "Hello! Explain the core of Game Theory."},
        ]
    )
    print(resp.choices[0].message.content)

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

openai_api_polling-0.1.4.tar.gz (44.8 kB view details)

Uploaded Source

Built Distribution

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

openai_api_polling-0.1.4-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file openai_api_polling-0.1.4.tar.gz.

File metadata

  • Download URL: openai_api_polling-0.1.4.tar.gz
  • Upload date:
  • Size: 44.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for openai_api_polling-0.1.4.tar.gz
Algorithm Hash digest
SHA256 b690f0cbc78c17487111e005bb000a3fba48a3e7a11886b62bcec8204291cd48
MD5 d133e443b3ad6bbd12bd0cd0e17fcc09
BLAKE2b-256 8a49a6abdd47a64bb8ab823eff7d9e5514df45ad1d44a27540508e56ecdbab16

See more details on using hashes here.

File details

Details for the file openai_api_polling-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: openai_api_polling-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for openai_api_polling-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2c5b382b29e95cd29a95413c6f61a506272038f15bf5568b66c55beb8f7b2df8
MD5 8bc23afe8ecbf6aabee035a24530ca40
BLAKE2b-256 9aad3cb2fef4e781f48f7efc323259a9c348e34771abbdb687fbc995173f3d6c

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