Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure support: Auto #11

Open
ctjlewis opened this issue Mar 2, 2024 · 0 comments
Open

Azure support: Auto #11

ctjlewis opened this issue Mar 2, 2024 · 0 comments

Comments

@ctjlewis
Copy link
Contributor

ctjlewis commented Mar 2, 2024

Rate limit headers don't behave exactly the same as OpenAI's API, no time to add right now, good first PR or will get to it later.

From Azure:

    MAIN | 2024-03-02 13:35:10 | HEADERS | {'cache-control': 'no-cache, must-revalidate', 'content-length': '831', 'content-type': 'application/json', 'access-control-allow-origin': '*', 'apim-request-id': 'bb943c68-99ed-46ab-bda9-a5efbdf5897a', 'strict-transport-security': 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options': 'nosniff', 'x-ms-region': 'North Central US', 'x-ratelimit-remaining-requests': '79', 'x-ratelimit-remaining-tokens': '61353', 'x-accel-buffering': 'no', 'x-request-id': '3a8b1a44-a02c-4a07-b51d-1c88acec4c4f', 'x-ms-client-request-id': 'bb943c68-99ed-46ab-bda9-a5efbdf5897a', 'azureml-model-session': 'd008-20240215231538', 'date': 'Sat, 02 Mar 2024 21:35:09 GMT'}

Seems wholly reliant on x-ratelimit-remaining-requests, where the library relies on OpenAI's x-ratelimit-limit-tokens headers, since their remaining-requests and remaining-tokens values are cached for long periods and do not update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant