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

Getting 100 sec timeout when using completion endpoint. I tried Httpclient #189

Open
abhishek6616 opened this issue Jan 17, 2024 · 1 comment

Comments

@abhishek6616
Copy link

HttpClient client;
OpenAIAPI api = new(new APIAuthentication(apiKey));
var clientFactory = api.HttpClientFactory;
if (clientFactory != null)
{
client = clientFactory.CreateClient();
}
else
{
client = new HttpClient();
}
client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", api.Auth.ApiKey);
client.DefaultRequestHeaders.Add("api-key", api.Auth.ApiKey);
client.DefaultRequestHeaders.Add("User-Agent", "user");
client.Timeout = TimeSpan.FromSeconds(1000);

@OkGoDoIt
Copy link
Owner

I assume this is a duplicate of #102, but I'll work on making it easier to set a custom timeout.

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

No branches or pull requests

2 participants