Browse Source

Merge branch 'abpframework:dev' into Frozen

pull/24373/head
Mark Cilia Vincenti 10 months ago
committed by GitHub
parent
commit
86a69b9f39
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      Directory.Packages.props
  2. 39
      docs/en/modules/ai-management/index.md
  3. 1
      framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/AbpEntityFrameworkCoreTestModule.cs
  4. 9
      latest-versions.json
  5. 5
      modules/audit-logging/test/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests/Volo/Abp/AuditLogging/EntityFrameworkCore/AbpAuditLoggingEntityFrameworkCoreTestModule.cs
  6. 5
      modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo/Abp/BackgroundJobs/EntityFrameworkCore/AbpBackgroundJobsEntityFrameworkCoreTestModule.cs
  7. 5
      modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.EntityFrameworkCore.Tests/EntityFrameworkCore/BlobStoringDatabaseEntityFrameworkCoreTestModule.cs
  8. 5
      modules/blogging/test/Volo.Blogging.EntityFrameworkCore.Tests/Volo/Blogging/EntityFrameworkCore/BloggingEntityFrameworkCoreTestModule.cs
  9. 1
      modules/cms-kit/test/Volo.CmsKit.EntityFrameworkCore.Tests/EntityFrameworkCore/CmsKitEntityFrameworkCoreTestModule.cs
  10. 5
      modules/docs/test/Volo.Docs.EntityFrameworkCore.Tests/Volo/Docs/EntityFrameworkCore/DocsEntityFrameworkCoreTestModule.cs
  11. 5
      modules/feature-management/test/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests/Volo/Abp/FeatureManagement/EntityFrameworkCore/AbpFeatureManagementEntityFrameworkCoreTestModule.cs
  12. 5
      modules/identity/test/Volo.Abp.Identity.EntityFrameworkCore.Tests/Volo/Abp/Identity/EntityFrameworkCore/AbpIdentityEntityFrameworkCoreTestModule.cs
  13. 5
      modules/openiddict/test/Volo.Abp.OpenIddict.EntityFrameworkCore.Tests/Volo/Abp/OpenIddict/EntityFrameworkCore/OpenIddictEntityFrameworkCoreTestModule.cs
  14. 5
      modules/setting-management/test/Volo.Abp.SettingManagement.EntityFrameworkCore.Tests/Volo/Abp/SettingManagement/EntityFrameworkCore/AbpSettingManagementEntityFrameworkCoreTestModule.cs
  15. 5
      modules/tenant-management/test/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests/Volo/Abp/TenantManagement/EntityFrameworkCore/AbpTenantManagementEntityFrameworkCoreTestModule.cs

4
Directory.Packages.props

@ -7,7 +7,7 @@
<PackageVersion Include="AlibabaCloud.SDK.Dysmsapi20170525" Version="4.0.0" /> <PackageVersion Include="AlibabaCloud.SDK.Dysmsapi20170525" Version="4.0.0" />
<PackageVersion Include="aliyun-net-sdk-sts" Version="3.1.3" /> <PackageVersion Include="aliyun-net-sdk-sts" Version="3.1.3" />
<PackageVersion Include="Aliyun.OSS.SDK.NetCore" Version="2.14.1" /> <PackageVersion Include="Aliyun.OSS.SDK.NetCore" Version="2.14.1" />
<PackageVersion Include="AsyncKeyedLock" Version="7.1.6" /> <PackageVersion Include="AsyncKeyedLock" Version="7.1.8" />
<PackageVersion Include="Autofac" Version="8.4.0" /> <PackageVersion Include="Autofac" Version="8.4.0" />
<PackageVersion Include="Autofac.Extensions.DependencyInjection" Version="10.0.0" /> <PackageVersion Include="Autofac.Extensions.DependencyInjection" Version="10.0.0" />
<PackageVersion Include="Autofac.Extras.DynamicProxy" Version="7.1.0" /> <PackageVersion Include="Autofac.Extras.DynamicProxy" Version="7.1.0" />
@ -196,4 +196,4 @@
<PackageVersion Include="Fody" Version="6.9.3" /> <PackageVersion Include="Fody" Version="6.9.3" />
<PackageVersion Include="System.Management" Version="10.0.0" /> <PackageVersion Include="System.Management" Version="10.0.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

39
docs/en/modules/ai-management/index.md

@ -10,8 +10,7 @@
> You must have an ABP Team or a higher license to use this module. > You must have an ABP Team or a higher license to use this module.
> **⚠️ Important Notice** > **⚠️ Important Notice**
> The **AI Management Module** is currently in **preview** and not yet production-ready. The documentation and implementation are subject to change. > The **AI Management Module** is currently in **preview**. The documentation and implementation are subject to change.
> We recommend using this module for **evaluation and experimentation** only, not in production environments for now.
This module implements AI (Artificial Intelligence) management capabilities on top of the [Artificial Intelligence Workspaces](../../framework/infrastructure/artificial-intelligence/index.md) feature of the ABP Framework and allows to manage workspaces dynamically from the application including UI components and API endpoints. This module implements AI (Artificial Intelligence) management capabilities on top of the [Artificial Intelligence Workspaces](../../framework/infrastructure/artificial-intelligence/index.md) feature of the ABP Framework and allows to manage workspaces dynamically from the application including UI components and API endpoints.
@ -453,6 +452,37 @@ Your application acts as a proxy, forwarding these requests to the AI Management
| **3. Client Remote** | No | Remote Service | Remote Service | No | Microservices consuming AI centrally | | **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 | | **4. Client Proxy** | No | Remote Service | Remote Service | Yes | API Gateway pattern, proxy services |
## 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.
```csharp
public class MyService
{
private readonly IWorkspaceConfigurationStore _workspaceConfigurationStore;
public MyService(IWorkspaceConfigurationStore workspaceConfigurationStore)
{
_workspaceConfigurationStore = workspaceConfigurationStore;
}
public async Task DoSomethingAsync()
{
// 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(
config.ModelName!,
new Uri(config.ApiBaseUrl),
config.ApiKey
)
.Build();
}
}
```
## Implementing Custom AI Provider Factories ## Implementing Custom AI Provider Factories
While the AI Management module provides built-in support for OpenAI through the `Volo.AIManagement.OpenAI` package, you can easily add support for other AI providers by implementing a custom `IChatClientFactory`. While the AI Management module provides built-in support for OpenAI through the `Volo.AIManagement.OpenAI` package, you can easily add support for other AI providers by implementing a custom `IChatClientFactory`.
@ -612,7 +642,7 @@ The following custom repositories are defined:
#### Domain Services #### Domain Services
- `ApplicationWorkspaceManager`: Manages workspace operations and validations. - `ApplicationWorkspaceManager`: Manages workspace operations and validations.
- `WorkspaceConfigurationStore`: Retrieves workspace configuration with caching. - `WorkspaceConfigurationStore`: Retrieves workspace configuration with caching. Implements `IWorkspaceConfigurationStore` interface.
- `ChatClientResolver`: Resolves the appropriate `IChatClient` implementation for a workspace. - `ChatClientResolver`: Resolves the appropriate `IChatClient` implementation for a workspace.
#### Integration Services #### Integration Services
@ -641,6 +671,9 @@ Workspace configurations are cached for performance. The cache key format:
WorkspaceConfiguration:{ApplicationName}:{WorkspaceName} 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. The cache is automatically invalidated when workspaces are created, updated, or deleted.
## See Also ## See Also

1
framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/AbpEntityFrameworkCoreTestModule.cs

@ -30,6 +30,7 @@ public class AbpEntityFrameworkCoreTestModule : AbpModule
public override void PreConfigureServices(ServiceConfigurationContext context) public override void PreConfigureServices(ServiceConfigurationContext context)
{ {
TestEntityExtensionConfigurator.Configure(); TestEntityExtensionConfigurator.Configure();
PreConfigure<AbpSqliteOptions>(x => x.BusyTimeout = null);
} }
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)

9
latest-versions.json

@ -1,4 +1,13 @@
[ [
{
"version": "9.3.7",
"releaseDate": "",
"type": "stable",
"message": "",
"leptonx": {
"version": "4.3.7"
}
},
{ {
"version": "10.0.1", "version": "10.0.1",
"releaseDate": "", "releaseDate": "",

5
modules/audit-logging/test/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests/Volo/Abp/AuditLogging/EntityFrameworkCore/AbpAuditLoggingEntityFrameworkCoreTestModule.cs

@ -16,6 +16,11 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore;
)] )]
public class AbpAuditLoggingEntityFrameworkCoreTestModule : AbpModule public class AbpAuditLoggingEntityFrameworkCoreTestModule : AbpModule
{ {
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<AbpSqliteOptions>(x => x.BusyTimeout = null);
}
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
var sqliteConnection = CreateDatabaseAndGetConnection(); var sqliteConnection = CreateDatabaseAndGetConnection();

5
modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo/Abp/BackgroundJobs/EntityFrameworkCore/AbpBackgroundJobsEntityFrameworkCoreTestModule.cs

@ -16,6 +16,11 @@ namespace Volo.Abp.BackgroundJobs.EntityFrameworkCore;
)] )]
public class AbpBackgroundJobsEntityFrameworkCoreTestModule : AbpModule public class AbpBackgroundJobsEntityFrameworkCoreTestModule : AbpModule
{ {
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<AbpSqliteOptions>(x => x.BusyTimeout = null);
}
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
var sqliteConnection = CreateDatabaseAndGetConnection(); var sqliteConnection = CreateDatabaseAndGetConnection();

5
modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.EntityFrameworkCore.Tests/EntityFrameworkCore/BlobStoringDatabaseEntityFrameworkCoreTestModule.cs

@ -15,6 +15,11 @@ namespace Volo.Abp.BlobStoring.Database.EntityFrameworkCore;
)] )]
public class BlobStoringDatabaseEntityFrameworkCoreTestModule : AbpModule public class BlobStoringDatabaseEntityFrameworkCoreTestModule : AbpModule
{ {
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<AbpSqliteOptions>(x => x.BusyTimeout = null);
}
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
var sqliteConnection = CreateDatabaseAndGetConnection(); var sqliteConnection = CreateDatabaseAndGetConnection();

5
modules/blogging/test/Volo.Blogging.EntityFrameworkCore.Tests/Volo/Blogging/EntityFrameworkCore/BloggingEntityFrameworkCoreTestModule.cs

@ -18,6 +18,11 @@ namespace Volo.Blogging.EntityFrameworkCore
{ {
private SqliteConnection _sqliteConnection; private SqliteConnection _sqliteConnection;
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<AbpSqliteOptions>(x => x.BusyTimeout = null);
}
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
_sqliteConnection = CreateDatabaseAndGetConnection(); _sqliteConnection = CreateDatabaseAndGetConnection();

1
modules/cms-kit/test/Volo.CmsKit.EntityFrameworkCore.Tests/EntityFrameworkCore/CmsKitEntityFrameworkCoreTestModule.cs

@ -20,6 +20,7 @@ public class CmsKitEntityFrameworkCoreTestModule : AbpModule
{ {
public override void PreConfigureServices(ServiceConfigurationContext context) public override void PreConfigureServices(ServiceConfigurationContext context)
{ {
PreConfigure<AbpSqliteOptions>(x => x.BusyTimeout = null);
context.Services.AddDataMigrationEnvironment(); context.Services.AddDataMigrationEnvironment();
} }

5
modules/docs/test/Volo.Docs.EntityFrameworkCore.Tests/Volo/Docs/EntityFrameworkCore/DocsEntityFrameworkCoreTestModule.cs

@ -15,6 +15,11 @@ namespace Volo.Docs.EntityFrameworkCore
)] )]
public class DocsEntityFrameworkCoreTestModule : AbpModule public class DocsEntityFrameworkCoreTestModule : AbpModule
{ {
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<AbpSqliteOptions>(x => x.BusyTimeout = null);
}
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
var sqliteConnection = CreateDatabaseAndGetConnection(); var sqliteConnection = CreateDatabaseAndGetConnection();

5
modules/feature-management/test/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests/Volo/Abp/FeatureManagement/EntityFrameworkCore/AbpFeatureManagementEntityFrameworkCoreTestModule.cs

@ -19,6 +19,11 @@ namespace Volo.Abp.FeatureManagement.EntityFrameworkCore;
)] )]
public class AbpFeatureManagementEntityFrameworkCoreTestModule : AbpModule public class AbpFeatureManagementEntityFrameworkCoreTestModule : AbpModule
{ {
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<AbpSqliteOptions>(x => x.BusyTimeout = null);
}
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
var sqliteConnection = CreateDatabaseAndGetConnection(); var sqliteConnection = CreateDatabaseAndGetConnection();

5
modules/identity/test/Volo.Abp.Identity.EntityFrameworkCore.Tests/Volo/Abp/Identity/EntityFrameworkCore/AbpIdentityEntityFrameworkCoreTestModule.cs

@ -18,6 +18,11 @@ namespace Volo.Abp.Identity.EntityFrameworkCore;
)] )]
public class AbpIdentityEntityFrameworkCoreTestModule : AbpModule public class AbpIdentityEntityFrameworkCoreTestModule : AbpModule
{ {
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<AbpSqliteOptions>(x => x.BusyTimeout = null);
}
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
var sqliteConnection = CreateDatabaseAndGetConnection(); var sqliteConnection = CreateDatabaseAndGetConnection();

5
modules/openiddict/test/Volo.Abp.OpenIddict.EntityFrameworkCore.Tests/Volo/Abp/OpenIddict/EntityFrameworkCore/OpenIddictEntityFrameworkCoreTestModule.cs

@ -20,6 +20,11 @@ namespace Volo.Abp.OpenIddict.EntityFrameworkCore;
)] )]
public class OpenIddictEntityFrameworkCoreTestModule : AbpModule public class OpenIddictEntityFrameworkCoreTestModule : AbpModule
{ {
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<AbpSqliteOptions>(x => x.BusyTimeout = null);
}
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
var sqliteConnection = CreateDatabaseAndGetConnection(); var sqliteConnection = CreateDatabaseAndGetConnection();

5
modules/setting-management/test/Volo.Abp.SettingManagement.EntityFrameworkCore.Tests/Volo/Abp/SettingManagement/EntityFrameworkCore/AbpSettingManagementEntityFrameworkCoreTestModule.cs

@ -17,6 +17,11 @@ namespace Volo.Abp.SettingManagement.EntityFrameworkCore;
)] )]
public class AbpSettingManagementEntityFrameworkCoreTestModule : AbpModule public class AbpSettingManagementEntityFrameworkCoreTestModule : AbpModule
{ {
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<AbpSqliteOptions>(x => x.BusyTimeout = null);
}
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
var sqliteConnection = CreateDatabaseAndGetConnection(); var sqliteConnection = CreateDatabaseAndGetConnection();

5
modules/tenant-management/test/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests/Volo/Abp/TenantManagement/EntityFrameworkCore/AbpTenantManagementEntityFrameworkCoreTestModule.cs

@ -17,6 +17,11 @@ namespace Volo.Abp.TenantManagement.EntityFrameworkCore;
)] )]
public class AbpTenantManagementEntityFrameworkCoreTestModule : AbpModule public class AbpTenantManagementEntityFrameworkCoreTestModule : AbpModule
{ {
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<AbpSqliteOptions>(x => x.BusyTimeout = null);
}
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
var sqliteConnection = CreateDatabaseAndGetConnection(); var sqliteConnection = CreateDatabaseAndGetConnection();

Loading…
Cancel
Save