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

Add OpenAI request timeout #858

Merged
merged 4 commits into from
Aug 7, 2024

Conversation

ashim-mahara
Copy link
Contributor

@ashim-mahara ashim-mahara commented Aug 6, 2024

The timeout kwarg for OpenAILLM was missing causing in timeouts when using OpenAI compatible servers that might take time to respond to requests.

@ashim-mahara ashim-mahara marked this pull request as ready for review August 6, 2024 18:35
@plaguss plaguss self-requested a review August 7, 2024 06:50
@plaguss plaguss changed the base branch from main to develop August 7, 2024 06:51
@plaguss plaguss added this to the 1.4.0 milestone Aug 7, 2024
Copy link
Contributor

@plaguss plaguss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

@plaguss
Copy link
Contributor

plaguss commented Aug 7, 2024

After reviewing with @gabrielmbmb we noticed this parameter can be informed at the client level:

from distilabel.llms import OpenAILLM

oai_llm = OpenAILLM(..., timeout=123)

So there's no need to pass the parameter again as a runtime parameter, but just to remove the internal timeout that was overriding the client definition.

@plaguss plaguss added fix and removed improvement labels Aug 7, 2024
@plaguss plaguss changed the base branch from develop to main August 7, 2024 08:47
@plaguss plaguss removed this from the 1.4.0 milestone Aug 7, 2024
@plaguss plaguss merged commit 268358b into argilla-io:main Aug 7, 2024
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants