mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-20 21:01:06 +08:00
revert: use blank User-Agent header when communicating with open-ai compatible service
This reverts commit 26ab0a7529.
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -84,8 +84,8 @@ namespace SourceGit.AI
|
||||
{
|
||||
var credential = new ApiKeyCredential(ReadApiKeyFromEnv ? Environment.GetEnvironmentVariable(ApiKey) : ApiKey);
|
||||
return Server.Contains("openai.azure.com/", StringComparison.Ordinal)
|
||||
? new AzureOpenAIClient(new Uri(Server), credential, new AzureOpenAIClientOptions() { UserAgentApplicationId = string.Empty })
|
||||
: new OpenAIClient(credential, new() { Endpoint = new Uri(Server), UserAgentApplicationId = string.Empty });
|
||||
? new AzureOpenAIClient(new Uri(Server), credential)
|
||||
: new OpenAIClient(credential, new() { Endpoint = new Uri(Server) });
|
||||
}
|
||||
|
||||
private string _name = string.Empty;
|
||||
|
||||
Reference in New Issue
Block a user