Skip to content

Example code snippet references an incorrect default timeout value #955

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

Closed
1 task done
slyapustin opened this issue Dec 8, 2023 · 1 comment
Closed
1 task done
Labels
bug Something isn't working

Comments

@slyapustin
Copy link

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

  • This is an issue with the Python library

Describe the bug

Example code snippet references an incorrect default timeout value of 60 seconds:

# default is 60s

When it's actually 10 minutes:

# default timeout is 10 minutes
DEFAULT_TIMEOUT = httpx.Timeout(timeout=600.0, connect=5.0)

I suggest either update code snippet comment to reflect an actual value or remove comment from the code snippet entirely.

To Reproduce

  1. Note timeout on the README.md
    # default is 60s
  2. Note timeout in the _constants.py
    # default timeout is 10 minutes
    DEFAULT_TIMEOUT = httpx.Timeout(timeout=600.0, connect=5.0)
  3. See the difference

Code snippets

> # default timeout is 10 minutes
> DEFAULT_TIMEOUT = httpx.Timeout(timeout=600.0, connect=5.0)


vs 
> # default is 60s

OS

Any

Python version

Any

Library version

openai v1.3.7

@slyapustin slyapustin added the bug Something isn't working label Dec 8, 2023
@slyapustin
Copy link
Author

I created PR to update comment in the code: #954

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants