OpenAI-API-dotnet icon indicating copy to clipboard operation
OpenAI-API-dotnet copied to clipboard

Add an option to override the default 100 second request timeout

Open ZakFahey opened this issue 1 year ago • 2 comments

My application is somewhat latency sensitive, and after a minute+, I'd rather the request not complete at all. Unfortunately it doesn't seem like there's a way to change this setting.

ZakFahey avatar Mar 21 '23 02:03 ZakFahey

Seems like https://github.com/OkGoDoIt/OpenAI-API-dotnet/pull/83 would let me have this use case, so that would be nice to merge. If not I guess I could depend on that fork for my project.

ZakFahey avatar Mar 22 '23 01:03 ZakFahey

You're correct, httpclient injection should make this possible. Also related to this is #44 Latest dotnet says you should use the HttpClientFactory so you configure the HttpClient is correctly summoned and disposed for the lifetime of the service and don't have to repeat yourself everytime in the ctor of the classes using the httpclient

Baklap4 avatar Mar 22 '23 08:03 Baklap4