Updated ChatClientAccessor and TypedChatClient to fallback to the default chat client if a workspace-specific client is not configured. Adjusted tests to verify that the default chat client is resolved for non-configured workspaces.
Added transient registration for IChatClientAccessor<> in AbpAIModule. Updated ChatClientAccessor to implement ITransientDependency and removed TryRegister from dependency attribute. Introduced unit tests for ChatClientAccessor resolution and behavior. Adjusted MockChatClient's StreamingResponseParts constant for test consistency.
Introduces IChatClientAccessor and related implementations for workspace-based chat client resolution. Refactors AbpAIOptions and AbpAIWorkspaceOptions, moving workspace configuration logic and service key generation to AbpAIWorkspaceOptions. Updates AbpAIModule to use new accessors and configuration structure, and adds ChatClientAccessor and NullChatClientAccessor classes for dependency injection. Improves separation of concerns and prepares for more flexible workspace management.
Removed ChatClientWithSystemMessage and its extension, consolidating system message logic into user-extensible patterns. Renamed ChatClientNameAttribute to WorkspaceNameAttribute and restricted its usage to classes. Added ConfigureDefault to WorkspaceConfigurationDictionary for easier default workspace setup. Updated documentation to reflect these changes and clarify configuration patterns.
Added new classes: WorkspaceConfiguration, WorkspaceConfigurationDictionary, and TypedKernelAccessor. These classes facilitate workspace-specific configurations and provide a typed access mechanism for the kernel service. Removed the previous implementation of WorkspaceConfiguration and its dictionary to streamline the configuration process.
Changed ChatClient and Kernel properties in WorkspaceConfiguration to be non-nullable and initialized by default. Removed null checks and redundant instantiation logic in configuration methods for improved code clarity and safety.
Updated WorkspaceConfiguration to include a Name property and refactored service registration to use workspaceConfig.Name instead of nested ChatClient/Kernel names. Simplified ChatClientConfiguration and KernelConfiguration by removing the Name property and constructors, and added fluent configuration methods to WorkspaceConfiguration for improved usability.
Replaces separate ChatClient and Kernel configuration dictionaries with a unified WorkspaceConfigurationDictionary. Removes related collection classes and extensions, updates service registration logic, and renames IKernel to IKernelAccessor. This change simplifies configuration and improves extensibility for managing multiple AI workspaces.
Introduced the Volo.Abp.AI.Abstractions project with a new ChatClientWithSystemMessage delegate and related extension methods. Updated the solution and AbpAIModule to include and reference the new abstractions, supporting enhanced AI chat client extensibility.
Introduced new delegates for ChatClient with system message, temperature, and tools in the Volo.Abp.AI.Abstractions project. Added corresponding extension methods in Volo.Abp.AI. Updated the solution file to include the new project and configuration platforms.