how can I intercept the SK outbound https traffic for debugging and troubleshooting? such as using mitmweb/mitmproxy #1513
-
Would confirm SK use http/2.0 or other special setting for outbound accessing Azure OpenAI endpoint? Use Azure OpenAI When I running all the cells in I set the HTTP Proxy to ` Environment.SetEnvironmentVariable("http_proxy", "http://localhost:8080"); and set proxy on the Windows 11 proxy settings: then I run cells one by one, after run the cell of The dinosaur replied, "It's easy, I just take my time!" But BTW: fiddler classic don't support |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Perhaps the Environment.SetEnvironmentVariable calls are not propagating? Another approach you could try: //give the HttpClient an instance of your proxy via the HttpClientHandler
var httpClient = new HttpClient(new HttpClientHandler { Proxy = new MyProxy() });
var sk = Kernel.Builder.WithAzureChatCompletionService(
"<deployment name>",
"<endpoint>",
"<key>",
true,
null,
false,
httpClient); //the HttpClient you pass in here is used by the underlying completion methods
//change the GetProxy URI below if it differs from what you need
class MyProxy : IWebProxy
{
public ICredentials? Credentials { get; set; }
public Uri? GetProxy(Uri destination)
{
return new Uri("http://localhost:8080");
}
public bool IsBypassed(Uri host)
{
return false;
}
} |
Beta Was this translation helpful? Give feedback.
Perhaps the Environment.SetEnvironmentVariable calls are not propagating?
Another approach you could try: