Skip to content

Commit

Permalink
Fixed use of OpenAI vs Azure OpenAI
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkMpn committed Jul 6, 2024
1 parent 9e74589 commit 9fd57a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MarkMpn.Sql4Cds.XTB/SqlQueryControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2166,7 +2166,7 @@ public async Task<string[]> SendMessage(string request)
{
if (_assistantClient == null)
{
var client = new Azure.AI.OpenAI.AzureOpenAIClient(new Uri(Settings.Instance.OpenAIEndpoint), new Azure.AzureKeyCredential(Settings.Instance.OpenAIKey));
var client = Settings.Instance.OpenAIEndpoint == "https://api.openai.com/" ? new OpenAI.OpenAIClient(new ApiKeyCredential(Settings.Instance.OpenAIKey)) : new Azure.AI.OpenAI.AzureOpenAIClient(new Uri(Settings.Instance.OpenAIEndpoint), new Azure.AzureKeyCredential(Settings.Instance.OpenAIKey));
_assistantClient = client.GetAssistantClient();
}

Expand Down

0 comments on commit 9fd57a2

Please sign in to comment.