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.1.tar.gz
(20.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openai_api_polling-0.1.1.tar.gz.
File metadata
- Download URL: openai_api_polling-0.1.1.tar.gz
- Upload date:
- Size: 20.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3750eb1b929ca1f62d6261554ca68236202bcb201faacfa5ef2f3940cad72992
|
|
| MD5 |
93453bd06a2ac5a397a1211e7f9876e4
|
|
| BLAKE2b-256 |
70ee1459f1f258f3c5ebb9dcce73e390da837c680640733c531e5c86e5cd7c18
|
File details
Details for the file openai_api_polling-0.1.1-py3-none-any.whl.
File metadata
- Download URL: openai_api_polling-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34ed2c7a18405c82b483de3d77132fd8f500639bacefd2a666be77677f94f5f6
|
|
| MD5 |
810ed291394e64a3c20c2c93bed21af4
|
|
| BLAKE2b-256 |
c03d1f50127292a4ce619d266739cf4c20efdd956cf33aa340a96e387c44db6c
|