Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CS/console-ai-extension/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ public SampleAITextModifier()
//defaultAIContainer = AIExtensionsContainerConsole.CreateDefaultAIExtensionContainer(ollamaChatClient);

///To register Azure OpenAI
AzureOpenAIClient azureOpenAIClient = new AzureOpenAIClient(new Uri(AzureOpenAIEndpoint),
new System.ClientModel.ApiKeyCredential(AzureOpenAIKey));
defaultAIContainer = AIExtensionsContainerConsole.CreateDefaultAIExtensionContainer(azureOpenAIClient.AsChatClient(DeploymentName));
IChatClient client = new AzureOpenAIClient(new Uri(AzureOpenAIEndpoint),
new System.ClientModel.ApiKeyCredential(AzureOpenAIKey)).GetChatClient(DeploymentName).AsIChatClient();
defaultAIContainer = AIExtensionsContainerConsole.CreateDefaultAIExtensionContainer(client);
}

public void ChangeDefaults()
Expand Down
8 changes: 4 additions & 4 deletions CS/console-ai-extension/Runtime-AI-Extensions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Azure.AI.OpenAI" Version="2.2.0-beta.1" />
<PackageReference Include="DevExpress.AIIntegration" Version="24.2.6" />
<PackageReference Include="Microsoft.Extensions.AI.Ollama" Version="9.3.0-preview.1.25161.3" />
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.3.0-preview.1.25161.3" />
<PackageReference Include="Azure.AI.OpenAI" Version="2.2.0-beta.4" />
<PackageReference Include="DevExpress.AIIntegration" Version="25.1.3" />
<PackageReference Include="Microsoft.Extensions.AI.Ollama" Version="9.5.0-preview.1.25265.7" />
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.5.0-preview.1.25265.7" />
</ItemGroup>

</Project>
6 changes: 3 additions & 3 deletions CS/winforms-ai-extensions/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ private static void RegisterDevExpressAI()
///To register Ollama
//OllamaChatClient ollamaChatClient = new OllamaChatClient("http://localhost:11434/", "llama3.1");

AzureOpenAIClient azureOpenAIClient = new AzureOpenAIClient(new Uri(AzureOpenAIEndpoint),
new System.ClientModel.ApiKeyCredential(AzureOpenAIKey));
AIExtensionsContainerDesktop.Default.RegisterChatClient(azureOpenAIClient.AsChatClient(DeploymentName));
IChatClient azureOpenAIClient = new AzureOpenAIClient(new Uri(AzureOpenAIEndpoint),
new System.ClientModel.ApiKeyCredential(AzureOpenAIKey)).GetChatClient(DeploymentName).AsIChatClient(); ;
AIExtensionsContainerDesktop.Default.RegisterChatClient(azureOpenAIClient);
}
}
}
8 changes: 4 additions & 4 deletions CS/winforms-ai-extensions/WinForms-AI-Extensions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Azure.AI.OpenAI" Version="2.2.0-beta.1" />
<PackageReference Include="DevExpress.AIIntegration.WinForms" Version="24.2.6" />
<PackageReference Include="DevExpress.Win" Version="24.2.6" />
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.3.0-preview.1.25161.3" />
<PackageReference Include="Azure.AI.OpenAI" Version="2.2.0-beta.4" />
<PackageReference Include="DevExpress.AIIntegration.WinForms" Version="25.1.3" />
<PackageReference Include="DevExpress.Win" Version="25.1.3" />
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.5.0-preview.1.25265.7" />
</ItemGroup>

<ItemGroup>
Expand Down
5 changes: 3 additions & 2 deletions CS/wpf-ai-extensions/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Configuration;
using System.Data;
using System.Windows;
using System.Windows.Media.Media3D;

namespace WPF_AI_Extensions
{
Expand All @@ -31,8 +32,8 @@ protected override void OnStartup(StartupEventArgs e)
//OllamaChatClient ollamaChatClient = new OllamaChatClient("http://localhost:11434/", "llama3.1");

IChatClient azureOpenAIClient = new AzureOpenAIClient(new Uri(AzureOpenAIEndpoint),
new System.ClientModel.ApiKeyCredential(AzureOpenAIKey))
.AsChatClient(DeploymentName);
new System.ClientModel.ApiKeyCredential(AzureOpenAIKey)).GetChatClient(DeploymentName).AsIChatClient();
AIExtensionsContainerDesktop.Default.RegisterChatClient(azureOpenAIClient);
}
}
}
8 changes: 4 additions & 4 deletions CS/wpf-ai-extensions/WPF-AI-Extensions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Azure.AI.OpenAI" Version="2.2.0-beta.1" />
<PackageReference Include="DevExpress.AIIntegration.Wpf" Version="24.2.6" />
<PackageReference Include="DevExpress.Wpf" Version="24.2.6" />
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.3.0-preview.1.25161.3" />
<PackageReference Include="Azure.AI.OpenAI" Version="2.2.0-beta.4" />
<PackageReference Include="DevExpress.AIIntegration.Wpf" Version="25.1.3" />
<PackageReference Include="DevExpress.Wpf" Version="25.1.3" />
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.5.0-preview.1.25265.7" />
</ItemGroup>

<ItemGroup>
Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ Install the following NuGet packages:
4. Microsoft.Extensions.AI.OpenAI

> [!Note]
> We use the following versions of the `Microsoft.Extensions.AI.*` libraries in our source code:
> We use the following versions of the `Microsoft.Extensions.AI.*` libraries in our `v25.1.3+` source code:
>
> v24.2.6+ | **9.3.0-preview.1.25161.3**
> `Microsoft.Extensions.AI` | *9.5.0*
> `Microsoft.Extensions.AI.Abstractions` | *9.5.0*
> `Microsoft.Extensions.AI.OpenAI` | *9.5.0-preview.1.25265.7*
>
> We do not guarantee compatibility or correct operation with higher versions. Refer to the following announcement for additional information: [Microsoft.Extensions.AI.Abstractions NuGet Package Version Upgrade in v24.2.6](https://community.devexpress.com/blogs/news/archive/2025/03/12/important-announcement-microsoft-extensions-ai-abstractions-nuget-package-version-upgrade.aspx).
> We do not guarantee compatibility or correct operation with higher versions. Refer to the following announcement for additional information: [DevExpress.AIIntegration moves to a stables version](https://supportcenter.devexpress.com/ticket/details/t1292705/devexpress-aiintegration-references-stable-versions-of-microsoft-ai-packages).

### Register AI Services

Expand All @@ -55,9 +57,9 @@ public SampleAITextModifier()
//defaultAIContainer = AIExtensionsContainerConsole.CreateDefaultAIExtensionContainer(ollamaChatClient);

///To register Azure OpenAI
AzureOpenAIClient azureOpenAIClient = new AzureOpenAIClient(new Uri(AzureOpenAIEndpoint),
new System.ClientModel.ApiKeyCredential(AzureOpenAIKey));
defaultAIContainer = AIExtensionsContainerConsole.CreateDefaultAIExtensionContainer(azureOpenAIClient.AsChatClient(DeploymentName));
IChatClient azureOpenAIClient = new AzureOpenAIClient(new Uri(AzureOpenAIEndpoint),
new System.ClientModel.ApiKeyCredential(AzureOpenAIKey)).GetChatClient(DeploymentName).AsIChatClient();
AIExtensionsContainerDesktop.Default.RegisterChatClient(azureOpenAIClient);
}
```

Expand Down