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

Ability to set a timeout value in seconds #31

Merged
merged 1 commit into from
Dec 6, 2022

Conversation

dsampaolo
Copy link
Contributor

Hi,

When OpenAI's servers are overloaded, it can be usefull to add a timeout value on the requests we send to them.

I just added a private $timeout property, and a public setter. Public API is not impacted, as the default value is still 0.

Usage :

$client->setTimeout(10); // <-- add this
$client->complete($params);```

@orhanerday orhanerday merged commit f8bcd09 into orhanerday:main Dec 6, 2022
@orhanerday
Copy link
Owner

orhanerday commented Dec 6, 2022

Thanks for your contribution! 3.2 released.

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

Successfully merging this pull request may close these issues.

None yet

2 participants