Skip to content
Tolga Kayhan edited this page Jul 31, 2023 · 2 revisions

AddOpenAIService will return an IHttpClientBuilder, which allows you to modify the HttpClient. You can easily add your proxy server using IHttpClientBuilder extensions.

serviceCollection.AddOpenAIService()
.ConfigurePrimaryHttpMessageHandler((s => new HttpClientHandler
{
    Proxy = new WebProxy("1.1.1.1:1010"),
}));
Clone this wiki locally