From a80d87bf07c35a2616834c087be99afe1ef848cb Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 11 Dec 2025 16:39:13 +0300 Subject: [PATCH 1/7] Update index.md --- docs/en/modules/ai-management/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/modules/ai-management/index.md b/docs/en/modules/ai-management/index.md index ad75029b8b..cff4c992f4 100644 --- a/docs/en/modules/ai-management/index.md +++ b/docs/en/modules/ai-management/index.md @@ -436,7 +436,7 @@ Once configured, other applications can call your application's endpoints: Your application acts as a proxy, forwarding these requests to the AI Management microservice. -## Comparison Table +### Comparison Table | Scenario | Database Required | Manages Config | Executes AI | Exposes API | Use Case | |----------|------------------|----------------|-------------|-------------|----------| From b91700cec7292dec61742ec9cc227aa4e14df8bc Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 11 Dec 2025 17:17:20 +0300 Subject: [PATCH 2/7] Add AI management chat widget docs and improve formatting Added documentation and image for the AI Management chat widget, including usage examples and JavaScript API details. Improved table formatting and consistency throughout the AI Management module documentation for better readability. --- docs/en/images/ai-management-widget.png | Bin 0 -> 14597 bytes docs/en/modules/ai-management/index.md | 221 +++++++++++++++++++----- 2 files changed, 173 insertions(+), 48 deletions(-) create mode 100644 docs/en/images/ai-management-widget.png diff --git a/docs/en/images/ai-management-widget.png b/docs/en/images/ai-management-widget.png new file mode 100644 index 0000000000000000000000000000000000000000..f3d9bbdbf8d0edf60c833cfe54dfb14f842c5b55 GIT binary patch literal 14597 zcmeHucT|&EwC@Kfj3dg}=`e~?1!>X}U~Hf?1*J$GBSED1Py@qQ5J*5N(p69_6a&&B z!J$MF0#c-h2oVAV0wIt93GhC2?t1U8yY7AW-gVb{>#a3^d<#y_Io~;ZpS}0@+h^~c zaMjXe-_PPd0|2n^vgrkD0N^(TAI?vL;4cAx)QfxHE7Rbrv+2GxZ!dhjulwtt zyAI}GmQ6E0gMl3rMqv^#eDc!y=cV2!1pM(ULLfBG5eAc>N=U1=v2;c_T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daFDs6~%C5BbwsDp(kgAFnZ17*X4yCXvK zmARu?(c(?xJ(`ghvr?70+8`-Tb4vKaG4u`iJHiIRFw;k6nVZO1{Djz6t;ZR_r1k>S zR^QLYUGTZ^U3a%R;buFh)wbzD_o-smR6yMS@2Uy4@aUI>zG&v_|swkPi3uDoc^&AR)fVpU2y%m!|G zW&Uhsfam?!j(SE@?ekp)aD_!>N-{?E;&fJ%rEx}d-h6{~b)C0OLRCdq7gJ(UaP0-x zpf@^cIjlG+C}Q0=7;BQZr1rZlw%a|g0QD0_g7iv*!rwS;&1~)d z;%*o9JiJUH)07a~E9OQxnbLLg32)>AA(9YDoI))RcR@|_euKEO!MylcY2hH@!|tK) zoXV7RsMD*cV&O+q6DsH-SWFGVwH0tH zN=B(_oSx3$OZ$Oo>;HO^Sf5Byz;VTLuu2W{$yw7@5-jL?ru3gF9?`5c7C-TL`4O0# zmN=#jCGXUrjC?Dbos|aj?)p!KSy*w*^-`?mrjCI1Y)5SpPV7{mxcdscQGRU5#-LYA zgu%+Q^!r&?B#(flXy~YwLa6dCU?%M4@6(1Uk3^ys40#f`p2~AzF`Jz@Tq)qXxj{!eYH4Gki{ezut87)1X8zKRG z7P;~y?W|r%caIkJ_0w?KBYElkz{f-ou2`>=ie-| zUV-&(zTqeMfN4iYs>9O)R{<2aQUL;g|c&QfBY|zca^&U literal 0 HcmV?d00001 diff --git a/docs/en/modules/ai-management/index.md b/docs/en/modules/ai-management/index.md index cff4c992f4..a1817d0c9a 100644 --- a/docs/en/modules/ai-management/index.md +++ b/docs/en/modules/ai-management/index.md @@ -21,7 +21,6 @@ abp add-module Volo.AIManagement Open ABP Studio, navigate to your solution explorer, **Right Click** on the project and select **Import Module**. Choose `Volo.AIManagement` from `NuGet` tab and check the "Install this Module" checkbox. Click the "OK" button to install the module. - ## Packages This module follows the [module development best practices guide](../../framework/architecture/best-practices) and consists of several NuGet and NPM packages. See the guide if you want to understand the packages and relations between them. @@ -37,7 +36,7 @@ AI Management module packages are designed for various usage scenarios. Packages AI Management module adds the following items to the "Main" menu: * **AI Management**: Root menu item for AI Management module. (`AIManagement`) - * **Workspaces**: Workspace management page. (`AIManagement.Workspaces`) + * **Workspaces**: Workspace management page. (`AIManagement.Workspaces`) `AIManagementMenus` class has the constants for the menu item names. @@ -80,21 +79,21 @@ Workspaces are the core concept of the AI Management module. A workspace represe When creating or managing a workspace, you can configure the following properties: -| Property | Required | Description | -|----------|----------|-------------| -| `Name` | Yes | Unique workspace identifier (cannot contain spaces) | -| `Provider` | Yes* | AI provider name (e.g., "OpenAI", "Ollama") | -| `ModelName` | Yes* | Model identifier (e.g., "gpt-4", "mistral") | -| `ApiKey` | No | API authentication key (required by some providers) | -| `ApiBaseUrl` | No | Custom endpoint URL (defaults to provider's default) | -| `SystemPrompt` | No | Default system prompt for all conversations | -| `Temperature` | No | Response randomness (0.0-1.0, defaults to provider default) | -| `Description` | No | Workspace description | -| `IsActive` | No | Enable/disable the workspace (default: true) | -| `ApplicationName` | No | Associate workspace with specific application | -| `RequiredPermissionName` | No | Permission required to use this workspace | -| `IsSystem` | No | Whether it's a system workspace (read-only) | -| `OverrideSystemConfiguration` | No | Allow database configuration to override code-defined settings | +| Property | Required | Description | +| ----------------------------- | -------- | -------------------------------------------------------------- | +| `Name` | Yes | Unique workspace identifier (cannot contain spaces) | +| `Provider` | Yes* | AI provider name (e.g., "OpenAI", "Ollama") | +| `ModelName` | Yes* | Model identifier (e.g., "gpt-4", "mistral") | +| `ApiKey` | No | API authentication key (required by some providers) | +| `ApiBaseUrl` | No | Custom endpoint URL (defaults to provider's default) | +| `SystemPrompt` | No | Default system prompt for all conversations | +| `Temperature` | No | Response randomness (0.0-1.0, defaults to provider default) | +| `Description` | No | Workspace description | +| `IsActive` | No | Enable/disable the workspace (default: true) | +| `ApplicationName` | No | Associate workspace with specific application | +| `RequiredPermissionName` | No | Permission required to use this workspace | +| `IsSystem` | No | Whether it's a system workspace (read-only) | +| `OverrideSystemConfiguration` | No | Allow database configuration to override code-defined settings | **\*Not required for system workspaces** @@ -158,7 +157,7 @@ public class WorkspaceDataSeederContributor : IDataSeedContributor, ITransientDe workspace.ApiKey = "your-api-key"; workspace.SystemPrompt = "You are a helpful customer support assistant."; - + await _workspaceRepository.InsertAsync(workspace); } ``` @@ -173,13 +172,12 @@ public class WorkspaceDataSeederContributor : IDataSeedContributor, ITransientDe The AI Management module defines the following permissions: -| Permission | Description | Default Granted To | -|------------|-------------|-------------------| -| `AIManagement.Workspaces` | View workspaces | Admin role | -| `AIManagement.Workspaces.Create` | Create new workspaces | Admin role | -| `AIManagement.Workspaces.Update` | Edit existing workspaces | Admin role | -| `AIManagement.Workspaces.Delete` | Delete workspaces | Admin role | - +| Permission | Description | Default Granted To | +| -------------------------------- | ------------------------ | ------------------ | +| `AIManagement.Workspaces` | View workspaces | Admin role | +| `AIManagement.Workspaces.Create` | Create new workspaces | Admin role | +| `AIManagement.Workspaces.Update` | Edit existing workspaces | Admin role | +| `AIManagement.Workspaces.Delete` | Delete workspaces | Admin role | ### Workspace-Level Permissions @@ -196,6 +194,7 @@ workspace.RequiredPermissionName = MyAppPermissions.AccessPremiumWorkspaces; ``` When a workspace has a required permission: + * Only authorized users with that permission can access the workspace endpoints * Users without the permission will receive an authorization error @@ -213,6 +212,7 @@ The AI Management module is designed to support various usage patterns, from sim In this scenario, you only use the ABP Framework's AI features directly. You configure AI providers (like OpenAI) in your code and don't need any database or management UI. **Required Packages:** + - `Volo.Abp.AI` - Any Microsoft AI extensions (e.g., `Microsoft.Extensions.AI.OpenAI`) @@ -250,7 +250,7 @@ public class MyService { _chatClient = chatClient; } - + public async Task GetResponseAsync(string prompt) { var response = await _chatClient.CompleteAsync(prompt); @@ -270,10 +270,12 @@ In this scenario, you install the AI Management module with its database layer, **Required Packages:** **Minimum (backend only):** + - `Volo.AIManagement.EntityFrameworkCore` (or `Volo.AIManagement.MongoDB`) - `Volo.AIManagement.OpenAI` (or another AI provider package) **Full installation (with UI and API):** + - `Volo.AIManagement.EntityFrameworkCore` (or `Volo.AIManagement.MongoDB`) - `Volo.AIManagement.Application` - `Volo.AIManagement.HttpApi` @@ -308,6 +310,7 @@ public class YourModule : AbpModule **Option 2 - Dynamic Workspace (UI-based):** No code configuration needed. Define workspaces through: + - The AI Management UI (navigate to AI Management > Workspaces) - Data seeding in your `DataSeeder` class @@ -332,6 +335,7 @@ public class MyService In this scenario, your application communicates with a separate AI Management microservice that manages configurations and communicates with AI providers on your behalf. The AI Management service handles all AI provider interactions. **Required Packages:** + - `Volo.AIManagement.Client.HttpApi.Client` **Configuration:** @@ -392,7 +396,7 @@ public class MyService var response = await _chatService.ChatCompletionsAsync(workspaceName, request); return response.Content; } - + // For streaming responses public async IAsyncEnumerable StreamAIResponseAsync(string workspaceName, string prompt) { @@ -419,6 +423,7 @@ public class MyService This scenario builds on Scenario 3, but your application exposes its own HTTP endpoints that other applications can call. Your application then forwards these requests to the AI Management service. **Required Packages:** + - `Volo.AIManagement.Client.HttpApi.Client` (to communicate with AI Management service) - `Volo.AIManagement.Client.Application` (application services) - `Volo.AIManagement.Client.HttpApi` (to expose HTTP endpoints) @@ -431,6 +436,7 @@ Same as Scenario 3, configure the remote AI Management service in `appsettings.j **Usage:** Once configured, other applications can call your application's endpoints: + - `POST /api/ai-management-client/chat-completion` for chat completions - `POST /api/ai-management-client/stream-chat-completion` for streaming responses @@ -438,15 +444,133 @@ Your application acts as a proxy, forwarding these requests to the AI Management ### Comparison Table -| Scenario | Database Required | Manages Config | Executes AI | Exposes API | Use Case | -|----------|------------------|----------------|-------------|-------------|----------| -| **1. No AI Management** | No | Code | Local | Optional | Simple apps, no config management needed | -| **2. Full AI Management** | Yes | Database/UI | Local | Optional | Monoliths, services managing their own AI | -| **3. Client Remote** | No | Remote Service | Remote Service | No | Microservices consuming AI centrally | -| **4. Client Proxy** | No | Remote Service | Remote Service | Yes | API Gateway pattern, proxy services | +| Scenario | Database Required | Manages Config | Executes AI | Exposes API | Use Case | +| ------------------------- | ----------------- | -------------- | -------------- | ----------- | ----------------------------------------- | +| **1. No AI Management** | No | Code | Local | Optional | Simple apps, no config management needed | +| **2. Full AI Management** | Yes | Database/UI | Local | Optional | Monoliths, services managing their own AI | +| **3. Client Remote** | No | Remote Service | Remote Service | No | Microservices consuming AI centrally | +| **4. Client Proxy** | No | Remote Service | Remote Service | Yes | API Gateway pattern, proxy services | + + + +## Client Usage (MVC UI) + +AI Management has a distinction in the naming of the packages. The `Volo.AIManagement.*` packages are for the main AI operations in the process and application itself. The `Volo.AIManagement.Client.*` packages are designed to consume the AI services from out of the application that is hosting the AI features. `Volo.AIManagement.*` packages don't expose any application service and endpoints to be consumed by default. You'll need to install the `Volo.AIManagement.Client.*` packages to both of your applications to expose the AI services and to consume the AI services to both of your applications. + +**List of packages:** +- `Volo.AIManagement.Client.Application` +- `Volo.AIManagement.Client.Application.Contracts` +- `Volo.AIManagement.Client.HttpApi` +- `Volo.AIManagement.Client.HttpApi.Client` +- `Volo.AIManagement.Client.Web` + +### The Chat Widget +The `Volo.AIManagement.Client.Web` package provides a chat widget to allow you easily integrate a chat interface into your application that uses a specific AI workspace named `ChatClientChatViewComponent`. + +#### Basic Usage +You can invoke the `ChatClientChatViewComponent` Widget in your razor page with the following code: + +```csharp +@await Component.InvokeAsync(typeof(ChatClientChatViewComponent), new ChatClientChatViewModel +{ + WorkspaceName = "mylama", +}) +``` + +![ai-management-workspaces](../../images/ai-management-widget.png) + +#### Properties +You can customize the chat widget with the following properties: +- `WorkspaceName`: The name of the workspace to use. +- `ComponentId`: The id of the component to use. +- `ConversationId`: The id of the conversation to store the chat history at the client side. +- `Title`: The title of the chat widget. +- `ShowStreamCheckbox`: Whether to show the stream checkbox. Allows user to toggle streaming on and off. Default is `false`. +- `UseStreaming`: Whether to use streaming by default. Default is `true`. _(overridden by `ShowStreamCheckbox` at UI)_ + +```csharp +@await Component.InvokeAsync(typeof(ChatClientChatViewComponent), new ChatClientChatViewModel +{ + WorkspaceName = "mylama", + ComponentId = "mylama-chat", + ConversationId = "mylama-conversation-" + @CurrentUser.Id, + Title = "My Custom Title", + ShowStreamCheckbox = true, + UseStreaming = true +}) +``` + +#### Using Conversation Id +You can use the `ConversationId` property to specify the id of the conversation to use. When the Conversation Id is provided, the chat will be stored at the client side and will be retrieved when the user revisits the page that contains the chat widget. +```csharp +@await Component.InvokeAsync(typeof(ChatClientChatViewComponent), new ChatClientChatViewModel +{ + WorkspaceName = "mylama", + ConversationId = "my-support-conversation-" + @CurrentUser.Id +}) +``` + +#### JavaScript API +All the initialized components in the page is stored in the `abp.chatComponents` object. You can retrieve a specific component by its `ComponentId` which is defined while invoking the ViewComponent. + +```csharp +@await Component.InvokeAsync(typeof(ChatClientChatViewComponent), new ChatClientChatViewModel +{ + WorkspaceName = "mylama", + ComponentId = "mylama-chat" +}) +``` + +You can then use the JavaScript API to interact with the component. +```js +var chatComponent = abp.chatComponents.get('mylama-chat'); +``` + +Once you have the component, you can use the following functions to interact with it: + +```js +// Switch to a different conversation +chatComponent.switchConversation(conversationId); + +// Create a new conversation with a specific model +chatComponent.createConversation(conversationId, modelName); + +// Clear the current conversation history +chatComponent.clearConversation(); + +// Get the current conversation ID (returns null for ephemeral conversations) +var currentId = chatComponent.getCurrentConversationId(); + +// Initialize with a specific conversation ID +chatComponent.initialize(conversationId); + +// Send a message programmatically +chatComponent.sendMessage(); + +// Listen to events +chatComponent.on('messageSent', function(data) { + console.log('Message sent:', data.message); + console.log('Conversation ID:', data.conversationId); + console.log('Is first message:', data.isFirstMessage); +}); + +chatComponent.on('messageReceived', function(data) { + console.log('AI response:', data.message); + console.log('Conversation ID:', data.conversationId); + console.log('Is streaming:', data.isStreaming); +}); + +chatComponent.on('streamStarted', function(data) { + console.log('Streaming started for conversation:', data.conversationId); +}); + +// Remove event listeners +chatComponent.off('messageSent', callbackFunction); +``` ## Using Dynamic Workspace Configurations for custom requirements + The AI Management module allows you to access only configuration of a workspace without resolving pre-constructed chat client. This is useful when you want to use a workspace for your own purposes and you don't need to use the chat client. The `IWorkspaceConfigurationStore` service is used to access the configuration of a workspace. It has multiple implementaations according to the usage scenario. @@ -463,7 +587,7 @@ public class MyService { // Get the configuration of the workspace that can be managed dynamically. var configuration = await _workspaceConfigurationStore.GetAsync("MyWorkspace"); - + // Do something with the configuration var kernel = Kernel.CreateBuilder() .AddAzureOpenAIChatClient( @@ -543,24 +667,23 @@ public override void ConfigureServices(ServiceConfigurationContext context) > [!TIP] > For production scenarios, you may want to add validation for the factory configuration. - ### Available Configuration Properties The `ChatClientCreationConfiguration` object provides the following properties from the database: -| Property | Type | Description | -|----------|------|-------------| -| `Name` | string | Workspace name | -| `Provider` | string | Provider name (e.g., "OpenAI", "Ollama") | -| `ApiKey` | string? | API key for authentication | -| `ModelName` | string | Model identifier (e.g., "gpt-4", "mistral") | -| `SystemPrompt` | string? | Default system prompt for the workspace | -| `Temperature` | float? | Temperature setting for response generation | -| `ApiBaseUrl` | string? | Custom API endpoint URL | -| `Description` | string? | Workspace description | -| `IsActive` | bool | Whether the workspace is active | -| `IsSystem` | bool | Whether it's a system workspace | -| `RequiredPermissionName` | string? | Permission required to use this workspace | +| Property | Type | Description | +| ------------------------ | ------- | ------------------------------------------- | +| `Name` | string | Workspace name | +| `Provider` | string | Provider name (e.g., "OpenAI", "Ollama") | +| `ApiKey` | string? | API key for authentication | +| `ModelName` | string | Model identifier (e.g., "gpt-4", "mistral") | +| `SystemPrompt` | string? | Default system prompt for the workspace | +| `Temperature` | float? | Temperature setting for response generation | +| `ApiBaseUrl` | string? | Custom API endpoint URL | +| `Description` | string? | Workspace description | +| `IsActive` | bool | Whether the workspace is active | +| `IsSystem` | bool | Whether it's a system workspace | +| `RequiredPermissionName` | string? | Permission required to use this workspace | ### Example: Azure OpenAI Factory @@ -597,6 +720,7 @@ public class AzureOpenAIChatClientFactory : IChatClientFactory, ITransientDepend After implementing and registering your factory: 1. **Through UI**: Navigate to the AI Management workspaces page and create a new workspace: + - Select your provider name (e.g., "Ollama", "AzureOpenAI") - Configure the API settings - Set the model name @@ -665,6 +789,7 @@ WorkspaceConfiguration:{ApplicationName}:{WorkspaceName} ``` ### HttpApi Client Layer + - `IntegrationWorkspaceConfigurationStore`: Integration service for remote workspace configuration retrieval. Implements `IWorkspaceConfigurationStore` interface. The cache is automatically invalidated when workspaces are created, updated, or deleted. From 1ff7243039ed127d64a89c86b6fb7288a93217bd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 11 Dec 2025 14:19:22 +0000 Subject: [PATCH 3/7] Optimised images with calibre/image-actions --- docs/en/images/ai-management-widget.png | Bin 14597 -> 3748 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/docs/en/images/ai-management-widget.png b/docs/en/images/ai-management-widget.png index f3d9bbdbf8d0edf60c833cfe54dfb14f842c5b55..2f396f3e5aab629a7ff87cf48857f844494fa396 100644 GIT binary patch literal 3748 zcmeHK30D(Y76wrPHP9k1h!A3;XtT*8$c}_1pb#5T6j@{xC19Z0l`SFyqM{)zL0QsB z0j4o9AS6Np=>{Q<83Ypc2&f2%7$RX!STbSp%=DZ&^9QESsaLmdy}I|lSMU4ktCw=d z*&eiQ|27E;36KNA#zjJ66GGhPWu(M+>^vOJ#m4Z=X;)hX1qB@NA~)lqS0kq9eh90&xb}pAi>BB_!k; zSDPdw==oLgg`$JaN!OeG+<^ywd-e~>+Z_@KJX*xUS_&d zXSbQT0}i%&^i-v-s6CtkWtf?`!*L9|QUt%<4}?%vA{}gzf?_x0tP~JxvascJY%@vq zm#Jp#v8W4x2|FDEPNU5cwW=;|n;g9FhRHw< zSmB6H8^M=&)vM{m$z);i|4PqNImu5!bEH>(a3Da4ggGT#5{%#{ z!jPB;Hp&EdoB)4=P|Wguk)=s z!jsL4!hDIb9@-w0!pbip?#NNNX--lat(w;Qb1%g82X#y)_-sSQd zXh`@aiSc|0w{`^^H?-@~^w8o0qfS1U*j~gA3->5<(%$WIsX9N2oz;Il7`o_7Hudz5 z`=hM%@?v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h6{~b)C0OLRCdq7gJ(UaP0-x zpf@^cIjlG+C}Q0=7;BQZr1rZlw%a|g0QD0_g7iv*!rwS;&1~)d z;%*o9JiJUH)07a~E9OQxnbLLg32)>AA(9YDoI))RcR@|_euKEO!MylcY2hH@!|tK) zoXV7RsMD*cV&O+q6DsH-SWFGVwH0tH zN=B(_oSx3$OZ$Oo>;HO^Sf5Byz;VTLuu2W{$yw7@5-jL?ru3gF9?`5c7C-TL`4O0# zmN=#jCGXUrjC?Dbos|aj?)p!KSy*w*^-`?mrjCI1Y)5SpPV7{mxcdscQGRU5#-LYA zgu%+Q^!r&?B#(flXy~YwLa6dCU?%M4@6(1Uk3^ys40#f`p2~AzF`Jz@Tq)qXxj{!eYH4Gki{ezut87)1X8zKRG z7P;~y?W|r%caIkJ_0w?KBYElkz{f-ou2`>=ie-| zUV-&(zTqeMfN4iYs>9O)R{<2aQUL;g|c&QfBY|zca^&U From a5bbe1998aa712a4112db01ace7672bf4f202d36 Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 11 Dec 2025 17:20:43 +0300 Subject: [PATCH 4/7] Extend Conversation Id usage --- docs/en/modules/ai-management/index.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/en/modules/ai-management/index.md b/docs/en/modules/ai-management/index.md index a1817d0c9a..a5a1ae0b2d 100644 --- a/docs/en/modules/ai-management/index.md +++ b/docs/en/modules/ai-management/index.md @@ -500,8 +500,9 @@ You can customize the chat widget with the following properties: }) ``` -#### Using Conversation Id -You can use the `ConversationId` property to specify the id of the conversation to use. When the Conversation Id is provided, the chat will be stored at the client side and will be retrieved when the user revisits the page that contains the chat widget. +#### Using the Conversation Id +You can use the `ConversationId` property to specify the id of the conversation to use. When the Conversation Id is provided, the chat will be stored at the client side and will be retrieved when the user revisits the page that contains the chat widget. If it's not provided or provided as **null**, the chat will be temporary and will not be saved, it'll be lost when the component lifetime ends. + ```csharp @await Component.InvokeAsync(typeof(ChatClientChatViewComponent), new ChatClientChatViewModel { From 5ac8986be8d16208259ab69b500c0592c9f8f93e Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 11 Dec 2025 17:26:29 +0300 Subject: [PATCH 5/7] Clarify package usage in AI Management docs Updated the documentation to better explain the distinction between `Volo.AIManagement.*` and `Volo.AIManagement.Client.*` packages, detailing their intended usage scenarios and roles. --- docs/en/modules/ai-management/index.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/en/modules/ai-management/index.md b/docs/en/modules/ai-management/index.md index a5a1ae0b2d..00c78a8944 100644 --- a/docs/en/modules/ai-management/index.md +++ b/docs/en/modules/ai-management/index.md @@ -455,7 +455,11 @@ Your application acts as a proxy, forwarding these requests to the AI Management ## Client Usage (MVC UI) -AI Management has a distinction in the naming of the packages. The `Volo.AIManagement.*` packages are for the main AI operations in the process and application itself. The `Volo.AIManagement.Client.*` packages are designed to consume the AI services from out of the application that is hosting the AI features. `Volo.AIManagement.*` packages don't expose any application service and endpoints to be consumed by default. You'll need to install the `Volo.AIManagement.Client.*` packages to both of your applications to expose the AI services and to consume the AI services to both of your applications. +AI Management uses different packages depending on the usage scenario: + +- **`Volo.AIManagement.*` packages**: These contain the core AI functionality and are used when your application hosts and manages its own AI operations. These packages don't expose any application service and endpoints to be consumed by default. + +- **`Volo.AIManagement.Client.*` packages**: These are designed for applications that need to consume AI services from a remote application. They provide both server and client side of remote access to the AI services. **List of packages:** - `Volo.AIManagement.Client.Application` From ea47c500abcb39b4c7bb6c001be73b8e799c4fbc Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 11 Dec 2025 17:33:23 +0300 Subject: [PATCH 6/7] Update chat component JS API docs with best practices Expanded the JavaScript API documentation for chat components to clarify initialization timing and added best-practice examples for accessing components after user interaction, rather than at page load. --- docs/en/modules/ai-management/index.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/docs/en/modules/ai-management/index.md b/docs/en/modules/ai-management/index.md index 00c78a8944..a699ea1688 100644 --- a/docs/en/modules/ai-management/index.md +++ b/docs/en/modules/ai-management/index.md @@ -516,7 +516,7 @@ You can use the `ConversationId` property to specify the id of the conversation ``` #### JavaScript API -All the initialized components in the page is stored in the `abp.chatComponents` object. You can retrieve a specific component by its `ComponentId` which is defined while invoking the ViewComponent. +The chat components are initialized automatically when the ViewComponent is rendered in the page. All the initialized components in the page are stored in the `abp.chatComponents` object. You can retrieve a specific component by its `ComponentId` which is defined while invoking the ViewComponent. ```csharp @await Component.InvokeAsync(typeof(ChatClientChatViewComponent), new ChatClientChatViewModel @@ -573,6 +573,28 @@ chatComponent.on('streamStarted', function(data) { chatComponent.off('messageSent', callbackFunction); ``` +**Best-practices:** +- Don't try to access the component at the page load time, it's not guaranteed to be initialized yet. Get the component whenever you need it to make sure it's **initialized** and the **latest state** is applied. + +❌ Don't do this +```js +(function(){ + var chatComponent = abp.chatComponents.get('mylama-chat'); + $('#my-button').on('click', function() { + chatComponent.clearConversation(); + }); +}); +``` + +✅ Do this +```js +(function(){ + $('#my-button').on('click', function() { + var chatComponent = abp.chatComponents.get('mylama-chat'); + chatComponent.clearConversation(); + }); +}); +``` ## Using Dynamic Workspace Configurations for custom requirements From 8110e9467af316911ec58617fc5782a700a002f8 Mon Sep 17 00:00:00 2001 From: Enis Necipoglu Date: Thu, 11 Dec 2025 17:40:27 +0300 Subject: [PATCH 7/7] Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- docs/en/modules/ai-management/index.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/en/modules/ai-management/index.md b/docs/en/modules/ai-management/index.md index a699ea1688..ee6236549f 100644 --- a/docs/en/modules/ai-management/index.md +++ b/docs/en/modules/ai-management/index.md @@ -469,7 +469,7 @@ AI Management uses different packages depending on the usage scenario: - `Volo.AIManagement.Client.Web` ### The Chat Widget -The `Volo.AIManagement.Client.Web` package provides a chat widget to allow you easily integrate a chat interface into your application that uses a specific AI workspace named `ChatClientChatViewComponent`. +The `Volo.AIManagement.Client.Web` package provides a chat widget to allow you to easily integrate a chat interface into your application that uses a specific AI workspace named `ChatClientChatViewComponent`. #### Basic Usage You can invoke the `ChatClientChatViewComponent` Widget in your razor page with the following code: @@ -486,11 +486,11 @@ You can invoke the `ChatClientChatViewComponent` Widget in your razor page with #### Properties You can customize the chat widget with the following properties: - `WorkspaceName`: The name of the workspace to use. -- `ComponentId`: The id of the component to use. -- `ConversationId`: The id of the conversation to store the chat history at the client side. +- `ComponentId`: Unique identifier for accessing the component via JavaScript API (stored in abp.chatComponents). +- `ConversationId`: The unique identifier for persisting and retrieving chat history from client-side storage. - `Title`: The title of the chat widget. - `ShowStreamCheckbox`: Whether to show the stream checkbox. Allows user to toggle streaming on and off. Default is `false`. -- `UseStreaming`: Whether to use streaming by default. Default is `true`. _(overridden by `ShowStreamCheckbox` at UI)_ +- `UseStreaming`: Default streaming behavior. Can be overridden by user when `ShowStreamCheckbox` is true. ```csharp @await Component.InvokeAsync(typeof(ChatClientChatViewComponent), new ChatClientChatViewModel