Skip to content

HttpClient.Timeout error #507

Answered by kayhantolga
Drosos-kalyvas asked this question in Q&A
Discussion options

You must be logged in to vote

Depending on how you initialize the library, you can set a timeout. Here's an example:

serviceCollection.AddOpenAIService()
    .ConfigureHttpClient(client =>
    {
        client.Timeout = TimeSpan.FromSeconds(180); // Sets the timeout to 180 seconds
    }); 

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Drosos-kalyvas
Comment options

Answer selected by Drosos-kalyvas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants