Closed aurora closed 1 week ago
Hello, @aurora!
System.ClientModel
has a very similar pipeline concept and you can supply a custom HttpClient
/transport via the client options instance:
OpenAIClientOptions options = new()
{
Transport = new HttpClientPipelineTransport(myHttpClient),
};
OpenAIClient client = new(options);
Hi @trrwilson,
Oh, I somehow overlooked this option. It works perfectly. Many thanks for your quick reply and help!
I wonder if there is an easy way to use a proxy server for connecting to the API. In Azure.AI.OpenAI, it is possible via HttpClientTransport in Azure.Core.Pipeline, and other libraries (such as Semantic Kernel) allow specifying a custom HttpClient instance. But I can't find a way to use a similar method with this library.