openai-python icon indicating copy to clipboard operation
openai-python copied to clipboard

Limits argument can never get passed down?

Open dmakhervaks opened this issue 1 year ago • 0 comments

Confirm this is an issue with the Python library and not an underlying OpenAI API

  • [X] This is an issue with the Python library

Describe the bug

It seems as though when initializing an openAI client like so:

since you cannot pass in the limits argument as a parameter, it will always default to the DEFAULT value here:

https://github.com/openai/openai-python/blob/aa6818997468b753546d55365d8142e2bb1c6640/src/openai/_base_client.py#L1127

openai.AsyncClient(())

To Reproduce

  1. Initialize an openai client like so: openai.AsyncClient(())
  2. Try to pass in 'limits' argument or modify the 'http_client' to have custom Limits.
  3. This will not actually be propagated

Code snippets

openai.AsyncClient(())

OS

linux

Python version

3.9.12

Library version

1.50.0

dmakhervaks avatar Oct 10 '24 22:10 dmakhervaks