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.5.tar.gz
(45.0 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.5.tar.gz.
File metadata
- Download URL: openai_api_polling-0.1.5.tar.gz
- Upload date:
- Size: 45.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","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 |
6cf668bcad604e699df2b38c9a271f17f4736f8d6aa0980f19ab0a62a2c04ff6
|
|
| MD5 |
b257056294725ce34f5cfa7a5aefddb1
|
|
| BLAKE2b-256 |
ade394186facfd7ecfb86e213385bcc379d18cf56d8a264acdeeb8d70c7b508b
|
File details
Details for the file openai_api_polling-0.1.5-py3-none-any.whl.
File metadata
- Download URL: openai_api_polling-0.1.5-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","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 |
a7e6c024305895c7f11777e4ec0d9559a2a30c08ecc2da31f1893c39698ee9dc
|
|
| MD5 |
89afc57aa855fe57763882de7616722e
|
|
| BLAKE2b-256 |
46acc9dd36ceed05130a521b2fdbbe655537723247334dd6888b718c4626a534
|