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.2.tar.gz (23.2 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.2-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: openai_api_polling-0.1.2.tar.gz
  • Upload date:
  • Size: 23.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","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.2.tar.gz
Algorithm Hash digest
SHA256 b627159b1b8429e6d23cd913a5a4b6607aae1b09f59ca4662aa5ef36d97e70b5
MD5 365665b9ec94c14d14cd8599175a74b3
BLAKE2b-256 d81f98beb53df6c1621557b744567ff4bc33c874ecff0a8ded1bbb61140f9b37

See more details on using hashes here.

File details

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

File metadata

  • Download URL: openai_api_polling-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 878ef0e2666fb297076ee45f600d81a064ad472ebe35f09d1be4720caa6da57a
MD5 02a82e6e9e570644e0f437e1f4c7d9df
BLAKE2b-256 19f22721125469bfd02a4855f0037b7331f4ae78badbf57c89d55bc8c104dd0b

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