Skip to content

Commit c4c75c3

Browse files
committed
revert: use blank User-Agent header when communicating with open-ai compatible service
This reverts commit 26ab0a7. Signed-off-by: leo <longshuang@msn.cn>
1 parent f8e8dca commit c4c75c3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/AI/Service.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ private OpenAIClient GetOpenAIClient()
8484
{
8585
var credential = new ApiKeyCredential(ReadApiKeyFromEnv ? Environment.GetEnvironmentVariable(ApiKey) : ApiKey);
8686
return Server.Contains("openai.azure.com/", StringComparison.Ordinal)
87-
? new AzureOpenAIClient(new Uri(Server), credential, new AzureOpenAIClientOptions() { UserAgentApplicationId = string.Empty })
88-
: new OpenAIClient(credential, new() { Endpoint = new Uri(Server), UserAgentApplicationId = string.Empty });
87+
? new AzureOpenAIClient(new Uri(Server), credential)
88+
: new OpenAIClient(credential, new() { Endpoint = new Uri(Server) });
8989
}
9090

9191
private string _name = string.Empty;

0 commit comments

Comments
 (0)