Azure-Samples / openai

The repository for all Azure OpenAI Samples complementing the OpenAI cookbook.
https://aka.ms/azure-openai
MIT License
1.05k stars 353 forks source link

Expose X-Ratelimit-* headers on ChatCompletion API requests #80

Closed Jonas1312 closed 8 months ago

Jonas1312 commented 9 months ago

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [x] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Hi,

I'm using openai-python library v1.3.5 with the AsyncAzureOpenAI client.

I'd like to get the rate limiting information in the response headers, see this issue for more context: https://github.com/openai/openai-python/issues/416#issuecomment-1795428669

But the response headers do not seem to contain this information when using Azure OpenAI.

Does the Azure OpenAI API returns this information? If yes, how to retrieve the information?

Thanks