OpenAI-API-dotnet
OpenAI-API-dotnet copied to clipboard
Add an option to override the default 100 second request timeout
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.
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.
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