fix: OpenAiHttpClient JWT configuration

This commit is contained in:
cuqmbr 2023-10-23 22:42:32 +03:00
parent e265257a2a
commit b1e878386e
Signed by: cuqmbr
GPG Key ID: 2D72ED98B6CB200F

View File

@ -28,9 +28,9 @@ public static class ServicesExtention
"OpenAiHttpClient",
client =>
{
client.BaseAddress = new Uri(configuration.GetValue<string>("ApiUri"));
client.BaseAddress = new Uri(configuration.GetValue<string>("OpenAi:ApiUrl"));
client.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", configuration.GetValue<string>("ApiKey"));
new AuthenticationHeaderValue("Bearer", configuration.GetValue<string>("OpenAi:ApiKey"));
});
return services;