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.4.tar.gz
(44.8 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.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b690f0cbc78c17487111e005bb000a3fba48a3e7a11886b62bcec8204291cd48
|
|
| MD5 |
d133e443b3ad6bbd12bd0cd0e17fcc09
|
|
| BLAKE2b-256 |
8a49a6abdd47a64bb8ab823eff7d9e5514df45ad1d44a27540508e56ecdbab16
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c5b382b29e95cd29a95413c6f61a506272038f15bf5568b66c55beb8f7b2df8
|
|
| MD5 |
8bc23afe8ecbf6aabee035a24530ca40
|
|
| BLAKE2b-256 |
9aad3cb2fef4e781f48f7efc323259a9c348e34771abbdb687fbc995173f3d6c
|