Skip to main content

Polling OpenAI API without rate limit issues.

Project description

OpenAI-API-Polling

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.3.tar.gz (44.7 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.3-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: openai_api_polling-0.1.3.tar.gz
  • Upload date:
  • Size: 44.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","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.3.tar.gz
Algorithm Hash digest
SHA256 ec0d6d69a4e648719a8750ac1a808601630feb0d31ee5a65661f3993567b5af0
MD5 242ec6320432fb5254e08224fa621184
BLAKE2b-256 3eedf454421ec9168905291b07fa22beb03dfb21cfbf28d5164532be0c84e4a4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: openai_api_polling-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9af2187027ea926835cbaca7d42c43dd2c2c7c52241f8d6e3c06a9cb085955fb
MD5 1b07735f6404e546879b07653bfc12d8
BLAKE2b-256 4125333f5819a0630e0f9de5709792cefb8b606a4aebf668c0418402a619c1e3

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