From 1d20c91b34775a49fdc87b5b4e4e548d0ed234c5 Mon Sep 17 00:00:00 2001 From: Robert Good Date: Sun, 1 Feb 2026 21:53:04 -0800 Subject: [PATCH 1/4] Specs to Tests --- src/Goodtocode.AgentFramework.Blazor.sln | 12 ++++++------ .../Actor/CreateActorCommand.feature | 0 .../Actor/CreateActorCommand.feature.cs | 2 +- .../Actor/CreateActorCommandStepDefinitions.cs | 2 +- .../Actor/DeleteActorCommand.feature | 0 .../Actor/DeleteActorCommand.feature.cs | 2 +- .../Actor/DeleteActorCommandStepDefinitions.cs | 2 +- .../Actor/GetActorByExternalIdQuery.feature | 0 .../Actor/GetActorByExternalIdQuery.feature.cs | 2 +- .../GetActorByExternalIdQueryStepDefinitions.cs | 2 +- .../Actor/GetActorChatSessionQuery.feature | 0 .../Actor/GetActorChatSessionQuery.feature.cs | 2 +- .../Actor/GetActorChatSessionQueryStepDefinitions.cs | 2 +- .../Actor/GetActorChatSessionsPaginatedQuery.feature | 0 .../GetActorChatSessionsPaginatedQuery.feature.cs | 2 +- ...ActorChatSessionsPaginatedQueryStepDefinitions.cs | 2 +- .../Actor/GetActorChatSessionsQuery.feature | 0 .../Actor/GetActorChatSessionsQuery.feature.cs | 2 +- .../GetActorChatSessionsQueryStepDefinitions.cs | 2 +- .../Actor/GetActorQuery.feature | 0 .../Actor/GetActorQuery.feature.cs | 2 +- .../Actor/GetActorQueryStepDefinitions.cs | 2 +- .../Actor/SaveActorCommand.feature | 0 .../Actor/SaveActorCommand.feature.cs | 2 +- .../Actor/SaveActorCommandStepDefinitions.cs | 2 +- .../Actor/UpdateActorCommand.feature | 0 .../Actor/UpdateActorCommand.feature.cs | 2 +- .../Actor/UpdateActorCommandStepDefinitions.cs | 2 +- .../Agent/MockAIAgent.cs | 2 +- .../Agent/MockAgentResponse.cs | 2 +- .../Agent/MockAgentSession.cs | 2 +- .../Agent/MockResponseUpdate.cs | 2 +- .../ChatCompletion/CreateChatMessageCommand.feature | 0 .../CreateChatMessageCommand.feature.cs | 2 +- .../CreateChatMessageCommandStepDefinitions.cs | 2 +- .../ChatCompletion/CreateChatSessionCommand.feature | 0 .../CreateChatSessionCommand.feature.cs | 2 +- .../CreateChatSessionCommandStepDefinitions.cs | 2 +- .../ChatCompletion/DeleteChatSessionCommand.feature | 0 .../DeleteChatSessionCommand.feature.cs | 2 +- .../DeleteChatSessionCommandStepDefinitions.cs | 2 +- .../ChatCompletion/GetChatMessageQuery.feature | 0 .../ChatCompletion/GetChatMessageQuery.feature.cs | 2 +- .../GetChatMessageQueryStepDefinitions.cs | 2 +- .../GetChatMessagesPaginatedQuery.feature | 0 .../GetChatMessagesPaginatedQuery.feature.cs | 2 +- .../GetChatMessagesPaginatedQueryStepDefinitions.cs | 2 +- .../ChatCompletion/GetChatMessagesQuery.feature | 0 .../ChatCompletion/GetChatMessagesQuery.feature.cs | 2 +- .../GetChatMessagesQueryStepDefinitions.cs | 2 +- .../ChatCompletion/GetChatSessionQuery.feature | 0 .../ChatCompletion/GetChatSessionQuery.feature.cs | 2 +- .../GetChatSessionQueryStepDefinitions.cs | 2 +- .../GetChatSessionsPaginatedQuery.feature | 0 .../GetChatSessionsPaginatedQuery.feature.cs | 2 +- .../GetChatSessionsPaginatedQueryStepDefinitions.cs | 2 +- .../ChatCompletion/GetChatSessionsQuery.feature | 0 .../ChatCompletion/GetChatSessionsQuery.feature.cs | 2 +- .../GetChatSessionsQueryStepDefinitions.cs | 2 +- .../ChatCompletion/PatchChatSessionCommand.feature | 0 .../PatchChatSessionCommand.feature.cs | 2 +- .../PatchChatSessionCommandStepDefinitions.cs | 2 +- .../ChatCompletion/UpdateChatSessionCommand.feature | 0 .../UpdateChatSessionCommand.feature.cs | 2 +- .../UpdateChatSessionCommandStepDefinitions.cs | 2 +- .../GlobalUsings.cs | 0 .../TestBase.cs | 4 ++-- .../TestUserInfo.cs | 2 +- .../Tests.Integration.csproj} | 4 ++-- .../appsettings.test.json | 0 70 files changed, 55 insertions(+), 55 deletions(-) rename src/{Tests.Specs.Integration => Tests.Integration}/Actor/CreateActorCommand.feature (100%) rename src/{Tests.Specs.Integration => Tests.Integration}/Actor/CreateActorCommand.feature.cs (99%) rename src/{Tests.Specs.Integration => Tests.Integration}/Actor/CreateActorCommandStepDefinitions.cs (98%) rename src/{Tests.Specs.Integration => Tests.Integration}/Actor/DeleteActorCommand.feature (100%) rename src/{Tests.Specs.Integration => Tests.Integration}/Actor/DeleteActorCommand.feature.cs (99%) rename src/{Tests.Specs.Integration => Tests.Integration}/Actor/DeleteActorCommandStepDefinitions.cs (97%) rename src/{Tests.Specs.Integration => Tests.Integration}/Actor/GetActorByExternalIdQuery.feature (100%) rename src/{Tests.Specs.Integration => Tests.Integration}/Actor/GetActorByExternalIdQuery.feature.cs (99%) rename src/{Tests.Specs.Integration => Tests.Integration}/Actor/GetActorByExternalIdQueryStepDefinitions.cs (97%) rename src/{Tests.Specs.Integration => Tests.Integration}/Actor/GetActorChatSessionQuery.feature (100%) rename src/{Tests.Specs.Integration => Tests.Integration}/Actor/GetActorChatSessionQuery.feature.cs (99%) rename src/{Tests.Specs.Integration => Tests.Integration}/Actor/GetActorChatSessionQueryStepDefinitions.cs (98%) rename src/{Tests.Specs.Integration => Tests.Integration}/Actor/GetActorChatSessionsPaginatedQuery.feature (100%) rename src/{Tests.Specs.Integration => Tests.Integration}/Actor/GetActorChatSessionsPaginatedQuery.feature.cs (99%) rename src/{Tests.Specs.Integration => Tests.Integration}/Actor/GetActorChatSessionsPaginatedQueryStepDefinitions.cs (99%) rename src/{Tests.Specs.Integration => Tests.Integration}/Actor/GetActorChatSessionsQuery.feature (100%) rename src/{Tests.Specs.Integration => Tests.Integration}/Actor/GetActorChatSessionsQuery.feature.cs (99%) rename src/{Tests.Specs.Integration => Tests.Integration}/Actor/GetActorChatSessionsQueryStepDefinitions.cs (98%) rename src/{Tests.Specs.Integration => Tests.Integration}/Actor/GetActorQuery.feature (100%) rename src/{Tests.Specs.Integration => Tests.Integration}/Actor/GetActorQuery.feature.cs (99%) rename src/{Tests.Specs.Integration => Tests.Integration}/Actor/GetActorQueryStepDefinitions.cs (97%) rename src/{Tests.Specs.Integration => Tests.Integration}/Actor/SaveActorCommand.feature (100%) rename src/{Tests.Specs.Integration => Tests.Integration}/Actor/SaveActorCommand.feature.cs (99%) rename src/{Tests.Specs.Integration => Tests.Integration}/Actor/SaveActorCommandStepDefinitions.cs (97%) rename src/{Tests.Specs.Integration => Tests.Integration}/Actor/UpdateActorCommand.feature (100%) rename src/{Tests.Specs.Integration => Tests.Integration}/Actor/UpdateActorCommand.feature.cs (99%) rename src/{Tests.Specs.Integration => Tests.Integration}/Actor/UpdateActorCommandStepDefinitions.cs (97%) rename src/{Tests.Specs.Integration => Tests.Integration}/Agent/MockAIAgent.cs (95%) rename src/{Tests.Specs.Integration => Tests.Integration}/Agent/MockAgentResponse.cs (90%) rename src/{Tests.Specs.Integration => Tests.Integration}/Agent/MockAgentSession.cs (86%) rename src/{Tests.Specs.Integration => Tests.Integration}/Agent/MockResponseUpdate.cs (90%) rename src/{Tests.Specs.Integration => Tests.Integration}/ChatCompletion/CreateChatMessageCommand.feature (100%) rename src/{Tests.Specs.Integration => Tests.Integration}/ChatCompletion/CreateChatMessageCommand.feature.cs (99%) rename src/{Tests.Specs.Integration => Tests.Integration}/ChatCompletion/CreateChatMessageCommandStepDefinitions.cs (97%) rename src/{Tests.Specs.Integration => Tests.Integration}/ChatCompletion/CreateChatSessionCommand.feature (100%) rename src/{Tests.Specs.Integration => Tests.Integration}/ChatCompletion/CreateChatSessionCommand.feature.cs (99%) rename src/{Tests.Specs.Integration => Tests.Integration}/ChatCompletion/CreateChatSessionCommandStepDefinitions.cs (97%) rename src/{Tests.Specs.Integration => Tests.Integration}/ChatCompletion/DeleteChatSessionCommand.feature (100%) rename src/{Tests.Specs.Integration => Tests.Integration}/ChatCompletion/DeleteChatSessionCommand.feature.cs (99%) rename src/{Tests.Specs.Integration => Tests.Integration}/ChatCompletion/DeleteChatSessionCommandStepDefinitions.cs (97%) rename src/{Tests.Specs.Integration => Tests.Integration}/ChatCompletion/GetChatMessageQuery.feature (100%) rename src/{Tests.Specs.Integration => Tests.Integration}/ChatCompletion/GetChatMessageQuery.feature.cs (99%) rename src/{Tests.Specs.Integration => Tests.Integration}/ChatCompletion/GetChatMessageQueryStepDefinitions.cs (98%) rename src/{Tests.Specs.Integration => Tests.Integration}/ChatCompletion/GetChatMessagesPaginatedQuery.feature (100%) rename src/{Tests.Specs.Integration => Tests.Integration}/ChatCompletion/GetChatMessagesPaginatedQuery.feature.cs (99%) rename src/{Tests.Specs.Integration => Tests.Integration}/ChatCompletion/GetChatMessagesPaginatedQueryStepDefinitions.cs (98%) rename src/{Tests.Specs.Integration => Tests.Integration}/ChatCompletion/GetChatMessagesQuery.feature (100%) rename src/{Tests.Specs.Integration => Tests.Integration}/ChatCompletion/GetChatMessagesQuery.feature.cs (99%) rename src/{Tests.Specs.Integration => Tests.Integration}/ChatCompletion/GetChatMessagesQueryStepDefinitions.cs (98%) rename src/{Tests.Specs.Integration => Tests.Integration}/ChatCompletion/GetChatSessionQuery.feature (100%) rename src/{Tests.Specs.Integration => Tests.Integration}/ChatCompletion/GetChatSessionQuery.feature.cs (99%) rename src/{Tests.Specs.Integration => Tests.Integration}/ChatCompletion/GetChatSessionQueryStepDefinitions.cs (98%) rename src/{Tests.Specs.Integration => Tests.Integration}/ChatCompletion/GetChatSessionsPaginatedQuery.feature (100%) rename src/{Tests.Specs.Integration => Tests.Integration}/ChatCompletion/GetChatSessionsPaginatedQuery.feature.cs (99%) rename src/{Tests.Specs.Integration => Tests.Integration}/ChatCompletion/GetChatSessionsPaginatedQueryStepDefinitions.cs (98%) rename src/{Tests.Specs.Integration => Tests.Integration}/ChatCompletion/GetChatSessionsQuery.feature (100%) rename src/{Tests.Specs.Integration => Tests.Integration}/ChatCompletion/GetChatSessionsQuery.feature.cs (99%) rename src/{Tests.Specs.Integration => Tests.Integration}/ChatCompletion/GetChatSessionsQueryStepDefinitions.cs (98%) rename src/{Tests.Specs.Integration => Tests.Integration}/ChatCompletion/PatchChatSessionCommand.feature (100%) rename src/{Tests.Specs.Integration => Tests.Integration}/ChatCompletion/PatchChatSessionCommand.feature.cs (99%) rename src/{Tests.Specs.Integration => Tests.Integration}/ChatCompletion/PatchChatSessionCommandStepDefinitions.cs (97%) rename src/{Tests.Specs.Integration => Tests.Integration}/ChatCompletion/UpdateChatSessionCommand.feature (100%) rename src/{Tests.Specs.Integration => Tests.Integration}/ChatCompletion/UpdateChatSessionCommand.feature.cs (99%) rename src/{Tests.Specs.Integration => Tests.Integration}/ChatCompletion/UpdateChatSessionCommandStepDefinitions.cs (97%) rename src/{Tests.Specs.Integration => Tests.Integration}/GlobalUsings.cs (100%) rename src/{Tests.Specs.Integration => Tests.Integration}/TestBase.cs (97%) rename src/{Tests.Specs.Integration => Tests.Integration}/TestUserInfo.cs (91%) rename src/{Tests.Specs.Integration/Tests.Specs.Integration.csproj => Tests.Integration/Tests.Integration.csproj} (91%) rename src/{Tests.Specs.Integration => Tests.Integration}/appsettings.test.json (100%) diff --git a/src/Goodtocode.AgentFramework.Blazor.sln b/src/Goodtocode.AgentFramework.Blazor.sln index 879effa..f7c413c 100644 --- a/src/Goodtocode.AgentFramework.Blazor.sln +++ b/src/Goodtocode.AgentFramework.Blazor.sln @@ -13,10 +13,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Presentation.Blazor", "Pres EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Infrastructure.SqlServer", "Infrastructure.SqlServer\Infrastructure.SqlServer.csproj", "{615694FE-4180-4F1F-9ED7-984BA2DFCEA7}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests.Specs.Integration", "Tests.Specs.Integration\Tests.Specs.Integration.csproj", "{5DD2A9DC-4CE9-4E47-BE7D-7EEF208D287F}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Infrastructure.AgentFramework", "Infrastructure.AgentFramework\Infrastructure.AgentFramework.csproj", "{21D8E349-812A-A224-C58B-62F682747EFF}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests.Integration", "Tests.Integration\Tests.Integration.csproj", "{AE0BE9C4-FF40-C7E2-B80E-F8BEF27C380B}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -43,14 +43,14 @@ Global {615694FE-4180-4F1F-9ED7-984BA2DFCEA7}.Debug|Any CPU.Build.0 = Debug|Any CPU {615694FE-4180-4F1F-9ED7-984BA2DFCEA7}.Release|Any CPU.ActiveCfg = Release|Any CPU {615694FE-4180-4F1F-9ED7-984BA2DFCEA7}.Release|Any CPU.Build.0 = Release|Any CPU - {5DD2A9DC-4CE9-4E47-BE7D-7EEF208D287F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5DD2A9DC-4CE9-4E47-BE7D-7EEF208D287F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5DD2A9DC-4CE9-4E47-BE7D-7EEF208D287F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5DD2A9DC-4CE9-4E47-BE7D-7EEF208D287F}.Release|Any CPU.Build.0 = Release|Any CPU {21D8E349-812A-A224-C58B-62F682747EFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {21D8E349-812A-A224-C58B-62F682747EFF}.Debug|Any CPU.Build.0 = Debug|Any CPU {21D8E349-812A-A224-C58B-62F682747EFF}.Release|Any CPU.ActiveCfg = Release|Any CPU {21D8E349-812A-A224-C58B-62F682747EFF}.Release|Any CPU.Build.0 = Release|Any CPU + {AE0BE9C4-FF40-C7E2-B80E-F8BEF27C380B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AE0BE9C4-FF40-C7E2-B80E-F8BEF27C380B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AE0BE9C4-FF40-C7E2-B80E-F8BEF27C380B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AE0BE9C4-FF40-C7E2-B80E-F8BEF27C380B}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/Tests.Specs.Integration/Actor/CreateActorCommand.feature b/src/Tests.Integration/Actor/CreateActorCommand.feature similarity index 100% rename from src/Tests.Specs.Integration/Actor/CreateActorCommand.feature rename to src/Tests.Integration/Actor/CreateActorCommand.feature diff --git a/src/Tests.Specs.Integration/Actor/CreateActorCommand.feature.cs b/src/Tests.Integration/Actor/CreateActorCommand.feature.cs similarity index 99% rename from src/Tests.Specs.Integration/Actor/CreateActorCommand.feature.cs rename to src/Tests.Integration/Actor/CreateActorCommand.feature.cs index 459c6e8..dd2576a 100644 --- a/src/Tests.Specs.Integration/Actor/CreateActorCommand.feature.cs +++ b/src/Tests.Integration/Actor/CreateActorCommand.feature.cs @@ -11,7 +11,7 @@ #region Designer generated code #pragma warning disable using Reqnroll; -namespace Goodtocode.AgentFramework.Specs.Integration.Actor +namespace Goodtocode.AgentFramework.Tests.Integration.Actor { diff --git a/src/Tests.Specs.Integration/Actor/CreateActorCommandStepDefinitions.cs b/src/Tests.Integration/Actor/CreateActorCommandStepDefinitions.cs similarity index 98% rename from src/Tests.Specs.Integration/Actor/CreateActorCommandStepDefinitions.cs rename to src/Tests.Integration/Actor/CreateActorCommandStepDefinitions.cs index e57baaf..5552316 100644 --- a/src/Tests.Specs.Integration/Actor/CreateActorCommandStepDefinitions.cs +++ b/src/Tests.Integration/Actor/CreateActorCommandStepDefinitions.cs @@ -1,7 +1,7 @@ using Goodtocode.AgentFramework.Core.Application.Actor; using Goodtocode.AgentFramework.Core.Domain.Actor; -namespace Goodtocode.AgentFramework.Specs.Integration.Actor; +namespace Goodtocode.AgentFramework.Tests.Integration.Actor; [Binding] [Scope(Tag = "createAuthorCommand")] diff --git a/src/Tests.Specs.Integration/Actor/DeleteActorCommand.feature b/src/Tests.Integration/Actor/DeleteActorCommand.feature similarity index 100% rename from src/Tests.Specs.Integration/Actor/DeleteActorCommand.feature rename to src/Tests.Integration/Actor/DeleteActorCommand.feature diff --git a/src/Tests.Specs.Integration/Actor/DeleteActorCommand.feature.cs b/src/Tests.Integration/Actor/DeleteActorCommand.feature.cs similarity index 99% rename from src/Tests.Specs.Integration/Actor/DeleteActorCommand.feature.cs rename to src/Tests.Integration/Actor/DeleteActorCommand.feature.cs index 95217b6..61f9ae3 100644 --- a/src/Tests.Specs.Integration/Actor/DeleteActorCommand.feature.cs +++ b/src/Tests.Integration/Actor/DeleteActorCommand.feature.cs @@ -11,7 +11,7 @@ #region Designer generated code #pragma warning disable using Reqnroll; -namespace Goodtocode.AgentFramework.Specs.Integration.Actor +namespace Goodtocode.AgentFramework.Tests.Integration.Actor { diff --git a/src/Tests.Specs.Integration/Actor/DeleteActorCommandStepDefinitions.cs b/src/Tests.Integration/Actor/DeleteActorCommandStepDefinitions.cs similarity index 97% rename from src/Tests.Specs.Integration/Actor/DeleteActorCommandStepDefinitions.cs rename to src/Tests.Integration/Actor/DeleteActorCommandStepDefinitions.cs index 52a0f5c..3155d68 100644 --- a/src/Tests.Specs.Integration/Actor/DeleteActorCommandStepDefinitions.cs +++ b/src/Tests.Integration/Actor/DeleteActorCommandStepDefinitions.cs @@ -1,7 +1,7 @@ using Goodtocode.AgentFramework.Core.Application.Actor; using Goodtocode.AgentFramework.Core.Domain.Actor; -namespace Goodtocode.AgentFramework.Specs.Integration.Actor +namespace Goodtocode.AgentFramework.Tests.Integration.Actor { [Binding] [Scope(Tag = "deleteAuthorCommand")] diff --git a/src/Tests.Specs.Integration/Actor/GetActorByExternalIdQuery.feature b/src/Tests.Integration/Actor/GetActorByExternalIdQuery.feature similarity index 100% rename from src/Tests.Specs.Integration/Actor/GetActorByExternalIdQuery.feature rename to src/Tests.Integration/Actor/GetActorByExternalIdQuery.feature diff --git a/src/Tests.Specs.Integration/Actor/GetActorByExternalIdQuery.feature.cs b/src/Tests.Integration/Actor/GetActorByExternalIdQuery.feature.cs similarity index 99% rename from src/Tests.Specs.Integration/Actor/GetActorByExternalIdQuery.feature.cs rename to src/Tests.Integration/Actor/GetActorByExternalIdQuery.feature.cs index d04a8c2..a0c44d0 100644 --- a/src/Tests.Specs.Integration/Actor/GetActorByExternalIdQuery.feature.cs +++ b/src/Tests.Integration/Actor/GetActorByExternalIdQuery.feature.cs @@ -11,7 +11,7 @@ #region Designer generated code #pragma warning disable using Reqnroll; -namespace Goodtocode.AgentFramework.Specs.Integration.Actor +namespace Goodtocode.AgentFramework.Tests.Integration.Actor { diff --git a/src/Tests.Specs.Integration/Actor/GetActorByExternalIdQueryStepDefinitions.cs b/src/Tests.Integration/Actor/GetActorByExternalIdQueryStepDefinitions.cs similarity index 97% rename from src/Tests.Specs.Integration/Actor/GetActorByExternalIdQueryStepDefinitions.cs rename to src/Tests.Integration/Actor/GetActorByExternalIdQueryStepDefinitions.cs index 6fca5e6..d58c594 100644 --- a/src/Tests.Specs.Integration/Actor/GetActorByExternalIdQueryStepDefinitions.cs +++ b/src/Tests.Integration/Actor/GetActorByExternalIdQueryStepDefinitions.cs @@ -1,7 +1,7 @@ using Goodtocode.AgentFramework.Core.Application.Actor; using Goodtocode.AgentFramework.Core.Domain.Actor; -namespace Goodtocode.AgentFramework.Specs.Integration.Actor; +namespace Goodtocode.AgentFramework.Tests.Integration.Actor; [Binding] [Scope(Tag = "getAuthorByOwnerIdQuery")] diff --git a/src/Tests.Specs.Integration/Actor/GetActorChatSessionQuery.feature b/src/Tests.Integration/Actor/GetActorChatSessionQuery.feature similarity index 100% rename from src/Tests.Specs.Integration/Actor/GetActorChatSessionQuery.feature rename to src/Tests.Integration/Actor/GetActorChatSessionQuery.feature diff --git a/src/Tests.Specs.Integration/Actor/GetActorChatSessionQuery.feature.cs b/src/Tests.Integration/Actor/GetActorChatSessionQuery.feature.cs similarity index 99% rename from src/Tests.Specs.Integration/Actor/GetActorChatSessionQuery.feature.cs rename to src/Tests.Integration/Actor/GetActorChatSessionQuery.feature.cs index f83aa86..114539e 100644 --- a/src/Tests.Specs.Integration/Actor/GetActorChatSessionQuery.feature.cs +++ b/src/Tests.Integration/Actor/GetActorChatSessionQuery.feature.cs @@ -11,7 +11,7 @@ #region Designer generated code #pragma warning disable using Reqnroll; -namespace Goodtocode.AgentFramework.Specs.Integration.Actor +namespace Goodtocode.AgentFramework.Tests.Integration.Actor { diff --git a/src/Tests.Specs.Integration/Actor/GetActorChatSessionQueryStepDefinitions.cs b/src/Tests.Integration/Actor/GetActorChatSessionQueryStepDefinitions.cs similarity index 98% rename from src/Tests.Specs.Integration/Actor/GetActorChatSessionQueryStepDefinitions.cs rename to src/Tests.Integration/Actor/GetActorChatSessionQueryStepDefinitions.cs index c805c10..f711988 100644 --- a/src/Tests.Specs.Integration/Actor/GetActorChatSessionQueryStepDefinitions.cs +++ b/src/Tests.Integration/Actor/GetActorChatSessionQueryStepDefinitions.cs @@ -2,7 +2,7 @@ using Goodtocode.AgentFramework.Core.Domain.Actor; using Goodtocode.AgentFramework.Core.Domain.ChatCompletion; -namespace Goodtocode.AgentFramework.Specs.Integration.Actor; +namespace Goodtocode.AgentFramework.Tests.Integration.Actor; [Binding] [Scope(Tag = "getAuthorChatSessionQuery")] diff --git a/src/Tests.Specs.Integration/Actor/GetActorChatSessionsPaginatedQuery.feature b/src/Tests.Integration/Actor/GetActorChatSessionsPaginatedQuery.feature similarity index 100% rename from src/Tests.Specs.Integration/Actor/GetActorChatSessionsPaginatedQuery.feature rename to src/Tests.Integration/Actor/GetActorChatSessionsPaginatedQuery.feature diff --git a/src/Tests.Specs.Integration/Actor/GetActorChatSessionsPaginatedQuery.feature.cs b/src/Tests.Integration/Actor/GetActorChatSessionsPaginatedQuery.feature.cs similarity index 99% rename from src/Tests.Specs.Integration/Actor/GetActorChatSessionsPaginatedQuery.feature.cs rename to src/Tests.Integration/Actor/GetActorChatSessionsPaginatedQuery.feature.cs index 9c9ee45..446806e 100644 --- a/src/Tests.Specs.Integration/Actor/GetActorChatSessionsPaginatedQuery.feature.cs +++ b/src/Tests.Integration/Actor/GetActorChatSessionsPaginatedQuery.feature.cs @@ -11,7 +11,7 @@ #region Designer generated code #pragma warning disable using Reqnroll; -namespace Goodtocode.AgentFramework.Specs.Integration.Actor +namespace Goodtocode.AgentFramework.Tests.Integration.Actor { diff --git a/src/Tests.Specs.Integration/Actor/GetActorChatSessionsPaginatedQueryStepDefinitions.cs b/src/Tests.Integration/Actor/GetActorChatSessionsPaginatedQueryStepDefinitions.cs similarity index 99% rename from src/Tests.Specs.Integration/Actor/GetActorChatSessionsPaginatedQueryStepDefinitions.cs rename to src/Tests.Integration/Actor/GetActorChatSessionsPaginatedQueryStepDefinitions.cs index 109a26b..abded29 100644 --- a/src/Tests.Specs.Integration/Actor/GetActorChatSessionsPaginatedQueryStepDefinitions.cs +++ b/src/Tests.Integration/Actor/GetActorChatSessionsPaginatedQueryStepDefinitions.cs @@ -3,7 +3,7 @@ using Goodtocode.AgentFramework.Core.Domain.Actor; using Goodtocode.AgentFramework.Core.Domain.ChatCompletion; -namespace Goodtocode.AgentFramework.Specs.Integration.Actor +namespace Goodtocode.AgentFramework.Tests.Integration.Actor { [Binding] [Scope(Tag = "getAuthorChatSessionsPaginatedQuery")] diff --git a/src/Tests.Specs.Integration/Actor/GetActorChatSessionsQuery.feature b/src/Tests.Integration/Actor/GetActorChatSessionsQuery.feature similarity index 100% rename from src/Tests.Specs.Integration/Actor/GetActorChatSessionsQuery.feature rename to src/Tests.Integration/Actor/GetActorChatSessionsQuery.feature diff --git a/src/Tests.Specs.Integration/Actor/GetActorChatSessionsQuery.feature.cs b/src/Tests.Integration/Actor/GetActorChatSessionsQuery.feature.cs similarity index 99% rename from src/Tests.Specs.Integration/Actor/GetActorChatSessionsQuery.feature.cs rename to src/Tests.Integration/Actor/GetActorChatSessionsQuery.feature.cs index b521dbe..38b28be 100644 --- a/src/Tests.Specs.Integration/Actor/GetActorChatSessionsQuery.feature.cs +++ b/src/Tests.Integration/Actor/GetActorChatSessionsQuery.feature.cs @@ -11,7 +11,7 @@ #region Designer generated code #pragma warning disable using Reqnroll; -namespace Goodtocode.AgentFramework.Specs.Integration.Actor +namespace Goodtocode.AgentFramework.Tests.Integration.Actor { diff --git a/src/Tests.Specs.Integration/Actor/GetActorChatSessionsQueryStepDefinitions.cs b/src/Tests.Integration/Actor/GetActorChatSessionsQueryStepDefinitions.cs similarity index 98% rename from src/Tests.Specs.Integration/Actor/GetActorChatSessionsQueryStepDefinitions.cs rename to src/Tests.Integration/Actor/GetActorChatSessionsQueryStepDefinitions.cs index 67333a3..5427e5c 100644 --- a/src/Tests.Specs.Integration/Actor/GetActorChatSessionsQueryStepDefinitions.cs +++ b/src/Tests.Integration/Actor/GetActorChatSessionsQueryStepDefinitions.cs @@ -2,7 +2,7 @@ using Goodtocode.AgentFramework.Core.Domain.Actor; using Goodtocode.AgentFramework.Core.Domain.ChatCompletion; -namespace Goodtocode.AgentFramework.Specs.Integration.Actor; +namespace Goodtocode.AgentFramework.Tests.Integration.Actor; [Binding] [Scope(Tag = "getAuthorChatSessionsQuery")] diff --git a/src/Tests.Specs.Integration/Actor/GetActorQuery.feature b/src/Tests.Integration/Actor/GetActorQuery.feature similarity index 100% rename from src/Tests.Specs.Integration/Actor/GetActorQuery.feature rename to src/Tests.Integration/Actor/GetActorQuery.feature diff --git a/src/Tests.Specs.Integration/Actor/GetActorQuery.feature.cs b/src/Tests.Integration/Actor/GetActorQuery.feature.cs similarity index 99% rename from src/Tests.Specs.Integration/Actor/GetActorQuery.feature.cs rename to src/Tests.Integration/Actor/GetActorQuery.feature.cs index 45e3274..a5b97ff 100644 --- a/src/Tests.Specs.Integration/Actor/GetActorQuery.feature.cs +++ b/src/Tests.Integration/Actor/GetActorQuery.feature.cs @@ -11,7 +11,7 @@ #region Designer generated code #pragma warning disable using Reqnroll; -namespace Goodtocode.AgentFramework.Specs.Integration.Actor +namespace Goodtocode.AgentFramework.Tests.Integration.Actor { diff --git a/src/Tests.Specs.Integration/Actor/GetActorQueryStepDefinitions.cs b/src/Tests.Integration/Actor/GetActorQueryStepDefinitions.cs similarity index 97% rename from src/Tests.Specs.Integration/Actor/GetActorQueryStepDefinitions.cs rename to src/Tests.Integration/Actor/GetActorQueryStepDefinitions.cs index 673b248..7b20772 100644 --- a/src/Tests.Specs.Integration/Actor/GetActorQueryStepDefinitions.cs +++ b/src/Tests.Integration/Actor/GetActorQueryStepDefinitions.cs @@ -1,7 +1,7 @@ using Goodtocode.AgentFramework.Core.Application.Actor; using Goodtocode.AgentFramework.Core.Domain.Actor; -namespace Goodtocode.AgentFramework.Specs.Integration.Actor; +namespace Goodtocode.AgentFramework.Tests.Integration.Actor; [Binding] [Scope(Tag = "getAuthorQuery")] diff --git a/src/Tests.Specs.Integration/Actor/SaveActorCommand.feature b/src/Tests.Integration/Actor/SaveActorCommand.feature similarity index 100% rename from src/Tests.Specs.Integration/Actor/SaveActorCommand.feature rename to src/Tests.Integration/Actor/SaveActorCommand.feature diff --git a/src/Tests.Specs.Integration/Actor/SaveActorCommand.feature.cs b/src/Tests.Integration/Actor/SaveActorCommand.feature.cs similarity index 99% rename from src/Tests.Specs.Integration/Actor/SaveActorCommand.feature.cs rename to src/Tests.Integration/Actor/SaveActorCommand.feature.cs index 0adc6e5..e101313 100644 --- a/src/Tests.Specs.Integration/Actor/SaveActorCommand.feature.cs +++ b/src/Tests.Integration/Actor/SaveActorCommand.feature.cs @@ -11,7 +11,7 @@ #region Designer generated code #pragma warning disable using Reqnroll; -namespace Goodtocode.AgentFramework.Specs.Integration.Actor +namespace Goodtocode.AgentFramework.Tests.Integration.Actor { diff --git a/src/Tests.Specs.Integration/Actor/SaveActorCommandStepDefinitions.cs b/src/Tests.Integration/Actor/SaveActorCommandStepDefinitions.cs similarity index 97% rename from src/Tests.Specs.Integration/Actor/SaveActorCommandStepDefinitions.cs rename to src/Tests.Integration/Actor/SaveActorCommandStepDefinitions.cs index f814a14..4075b27 100644 --- a/src/Tests.Specs.Integration/Actor/SaveActorCommandStepDefinitions.cs +++ b/src/Tests.Integration/Actor/SaveActorCommandStepDefinitions.cs @@ -1,7 +1,7 @@ using Goodtocode.AgentFramework.Core.Application.Actor; using Goodtocode.AgentFramework.Core.Domain.Actor; -namespace Goodtocode.AgentFramework.Specs.Integration.Actor; +namespace Goodtocode.AgentFramework.Tests.Integration.Actor; [Binding] [Scope(Tag = "saveAuthorCommand")] diff --git a/src/Tests.Specs.Integration/Actor/UpdateActorCommand.feature b/src/Tests.Integration/Actor/UpdateActorCommand.feature similarity index 100% rename from src/Tests.Specs.Integration/Actor/UpdateActorCommand.feature rename to src/Tests.Integration/Actor/UpdateActorCommand.feature diff --git a/src/Tests.Specs.Integration/Actor/UpdateActorCommand.feature.cs b/src/Tests.Integration/Actor/UpdateActorCommand.feature.cs similarity index 99% rename from src/Tests.Specs.Integration/Actor/UpdateActorCommand.feature.cs rename to src/Tests.Integration/Actor/UpdateActorCommand.feature.cs index f3c2cfb..0c4ad60 100644 --- a/src/Tests.Specs.Integration/Actor/UpdateActorCommand.feature.cs +++ b/src/Tests.Integration/Actor/UpdateActorCommand.feature.cs @@ -11,7 +11,7 @@ #region Designer generated code #pragma warning disable using Reqnroll; -namespace Goodtocode.AgentFramework.Specs.Integration.Actor +namespace Goodtocode.AgentFramework.Tests.Integration.Actor { diff --git a/src/Tests.Specs.Integration/Actor/UpdateActorCommandStepDefinitions.cs b/src/Tests.Integration/Actor/UpdateActorCommandStepDefinitions.cs similarity index 97% rename from src/Tests.Specs.Integration/Actor/UpdateActorCommandStepDefinitions.cs rename to src/Tests.Integration/Actor/UpdateActorCommandStepDefinitions.cs index 8faeaa2..15bb658 100644 --- a/src/Tests.Specs.Integration/Actor/UpdateActorCommandStepDefinitions.cs +++ b/src/Tests.Integration/Actor/UpdateActorCommandStepDefinitions.cs @@ -1,7 +1,7 @@ using Goodtocode.AgentFramework.Core.Application.Actor; using Goodtocode.AgentFramework.Core.Domain.Actor; -namespace Goodtocode.AgentFramework.Specs.Integration.Actor +namespace Goodtocode.AgentFramework.Tests.Integration.Actor { [Binding] [Scope(Tag = "updateAuthorCommand")] diff --git a/src/Tests.Specs.Integration/Agent/MockAIAgent.cs b/src/Tests.Integration/Agent/MockAIAgent.cs similarity index 95% rename from src/Tests.Specs.Integration/Agent/MockAIAgent.cs rename to src/Tests.Integration/Agent/MockAIAgent.cs index 2a37457..cc338d5 100644 --- a/src/Tests.Specs.Integration/Agent/MockAIAgent.cs +++ b/src/Tests.Integration/Agent/MockAIAgent.cs @@ -2,7 +2,7 @@ using Microsoft.Extensions.AI; using System.Text.Json; -namespace Goodtocode.AgentFramework.Specs.Integration.Agent; +namespace Goodtocode.AgentFramework.Tests.Integration.Agent; public class MockAIAgent : AIAgent { diff --git a/src/Tests.Specs.Integration/Agent/MockAgentResponse.cs b/src/Tests.Integration/Agent/MockAgentResponse.cs similarity index 90% rename from src/Tests.Specs.Integration/Agent/MockAgentResponse.cs rename to src/Tests.Integration/Agent/MockAgentResponse.cs index b1c32ce..1399b06 100644 --- a/src/Tests.Specs.Integration/Agent/MockAgentResponse.cs +++ b/src/Tests.Integration/Agent/MockAgentResponse.cs @@ -1,7 +1,7 @@ using Microsoft.Agents.AI; using Microsoft.Extensions.AI; -namespace Goodtocode.AgentFramework.Specs.Integration.Agent; +namespace Goodtocode.AgentFramework.Tests.Integration.Agent; public class MockAgentResponse : AgentResponse { diff --git a/src/Tests.Specs.Integration/Agent/MockAgentSession.cs b/src/Tests.Integration/Agent/MockAgentSession.cs similarity index 86% rename from src/Tests.Specs.Integration/Agent/MockAgentSession.cs rename to src/Tests.Integration/Agent/MockAgentSession.cs index 7ebb7c4..af6ad51 100644 --- a/src/Tests.Specs.Integration/Agent/MockAgentSession.cs +++ b/src/Tests.Integration/Agent/MockAgentSession.cs @@ -1,7 +1,7 @@ using Microsoft.Agents.AI; using System.Text.Json; -namespace Goodtocode.AgentFramework.Specs.Integration.Agent; +namespace Goodtocode.AgentFramework.Tests.Integration.Agent; public class MockAgentSession : AgentSession { diff --git a/src/Tests.Specs.Integration/Agent/MockResponseUpdate.cs b/src/Tests.Integration/Agent/MockResponseUpdate.cs similarity index 90% rename from src/Tests.Specs.Integration/Agent/MockResponseUpdate.cs rename to src/Tests.Integration/Agent/MockResponseUpdate.cs index 6175912..068d97e 100644 --- a/src/Tests.Specs.Integration/Agent/MockResponseUpdate.cs +++ b/src/Tests.Integration/Agent/MockResponseUpdate.cs @@ -1,7 +1,7 @@ using Microsoft.Agents.AI; using Microsoft.Extensions.AI; -namespace Goodtocode.AgentFramework.Specs.Integration.Agent; +namespace Goodtocode.AgentFramework.Tests.Integration.Agent; public class MockAgentResponseUpdate : AgentResponseUpdate { diff --git a/src/Tests.Specs.Integration/ChatCompletion/CreateChatMessageCommand.feature b/src/Tests.Integration/ChatCompletion/CreateChatMessageCommand.feature similarity index 100% rename from src/Tests.Specs.Integration/ChatCompletion/CreateChatMessageCommand.feature rename to src/Tests.Integration/ChatCompletion/CreateChatMessageCommand.feature diff --git a/src/Tests.Specs.Integration/ChatCompletion/CreateChatMessageCommand.feature.cs b/src/Tests.Integration/ChatCompletion/CreateChatMessageCommand.feature.cs similarity index 99% rename from src/Tests.Specs.Integration/ChatCompletion/CreateChatMessageCommand.feature.cs rename to src/Tests.Integration/ChatCompletion/CreateChatMessageCommand.feature.cs index c75c996..923cf4d 100644 --- a/src/Tests.Specs.Integration/ChatCompletion/CreateChatMessageCommand.feature.cs +++ b/src/Tests.Integration/ChatCompletion/CreateChatMessageCommand.feature.cs @@ -11,7 +11,7 @@ #region Designer generated code #pragma warning disable using Reqnroll; -namespace Goodtocode.AgentFramework.Specs.Integration.ChatCompletion +namespace Goodtocode.AgentFramework.Tests.Integration.ChatCompletion { diff --git a/src/Tests.Specs.Integration/ChatCompletion/CreateChatMessageCommandStepDefinitions.cs b/src/Tests.Integration/ChatCompletion/CreateChatMessageCommandStepDefinitions.cs similarity index 97% rename from src/Tests.Specs.Integration/ChatCompletion/CreateChatMessageCommandStepDefinitions.cs rename to src/Tests.Integration/ChatCompletion/CreateChatMessageCommandStepDefinitions.cs index bdaf109..8ca9999 100644 --- a/src/Tests.Specs.Integration/ChatCompletion/CreateChatMessageCommandStepDefinitions.cs +++ b/src/Tests.Integration/ChatCompletion/CreateChatMessageCommandStepDefinitions.cs @@ -2,7 +2,7 @@ using Goodtocode.AgentFramework.Core.Domain.Actor; using Goodtocode.AgentFramework.Core.Domain.ChatCompletion; -namespace Goodtocode.AgentFramework.Specs.Integration.ChatCompletion; +namespace Goodtocode.AgentFramework.Tests.Integration.ChatCompletion; [Binding] [Scope(Tag = "createChatMessageCommand")] diff --git a/src/Tests.Specs.Integration/ChatCompletion/CreateChatSessionCommand.feature b/src/Tests.Integration/ChatCompletion/CreateChatSessionCommand.feature similarity index 100% rename from src/Tests.Specs.Integration/ChatCompletion/CreateChatSessionCommand.feature rename to src/Tests.Integration/ChatCompletion/CreateChatSessionCommand.feature diff --git a/src/Tests.Specs.Integration/ChatCompletion/CreateChatSessionCommand.feature.cs b/src/Tests.Integration/ChatCompletion/CreateChatSessionCommand.feature.cs similarity index 99% rename from src/Tests.Specs.Integration/ChatCompletion/CreateChatSessionCommand.feature.cs rename to src/Tests.Integration/ChatCompletion/CreateChatSessionCommand.feature.cs index 07bf947..215fd9c 100644 --- a/src/Tests.Specs.Integration/ChatCompletion/CreateChatSessionCommand.feature.cs +++ b/src/Tests.Integration/ChatCompletion/CreateChatSessionCommand.feature.cs @@ -11,7 +11,7 @@ #region Designer generated code #pragma warning disable using Reqnroll; -namespace Goodtocode.AgentFramework.Specs.Integration.ChatCompletion +namespace Goodtocode.AgentFramework.Tests.Integration.ChatCompletion { diff --git a/src/Tests.Specs.Integration/ChatCompletion/CreateChatSessionCommandStepDefinitions.cs b/src/Tests.Integration/ChatCompletion/CreateChatSessionCommandStepDefinitions.cs similarity index 97% rename from src/Tests.Specs.Integration/ChatCompletion/CreateChatSessionCommandStepDefinitions.cs rename to src/Tests.Integration/ChatCompletion/CreateChatSessionCommandStepDefinitions.cs index f161c3e..ff1c144 100644 --- a/src/Tests.Specs.Integration/ChatCompletion/CreateChatSessionCommandStepDefinitions.cs +++ b/src/Tests.Integration/ChatCompletion/CreateChatSessionCommandStepDefinitions.cs @@ -2,7 +2,7 @@ using Goodtocode.AgentFramework.Core.Domain.Actor; using Goodtocode.AgentFramework.Core.Domain.ChatCompletion; -namespace Goodtocode.AgentFramework.Specs.Integration.ChatCompletion; +namespace Goodtocode.AgentFramework.Tests.Integration.ChatCompletion; [Binding] [Scope(Tag = "createChatSessionCommand")] diff --git a/src/Tests.Specs.Integration/ChatCompletion/DeleteChatSessionCommand.feature b/src/Tests.Integration/ChatCompletion/DeleteChatSessionCommand.feature similarity index 100% rename from src/Tests.Specs.Integration/ChatCompletion/DeleteChatSessionCommand.feature rename to src/Tests.Integration/ChatCompletion/DeleteChatSessionCommand.feature diff --git a/src/Tests.Specs.Integration/ChatCompletion/DeleteChatSessionCommand.feature.cs b/src/Tests.Integration/ChatCompletion/DeleteChatSessionCommand.feature.cs similarity index 99% rename from src/Tests.Specs.Integration/ChatCompletion/DeleteChatSessionCommand.feature.cs rename to src/Tests.Integration/ChatCompletion/DeleteChatSessionCommand.feature.cs index 6cbe0b1..a93db97 100644 --- a/src/Tests.Specs.Integration/ChatCompletion/DeleteChatSessionCommand.feature.cs +++ b/src/Tests.Integration/ChatCompletion/DeleteChatSessionCommand.feature.cs @@ -11,7 +11,7 @@ #region Designer generated code #pragma warning disable using Reqnroll; -namespace Goodtocode.AgentFramework.Specs.Integration.ChatCompletion +namespace Goodtocode.AgentFramework.Tests.Integration.ChatCompletion { diff --git a/src/Tests.Specs.Integration/ChatCompletion/DeleteChatSessionCommandStepDefinitions.cs b/src/Tests.Integration/ChatCompletion/DeleteChatSessionCommandStepDefinitions.cs similarity index 97% rename from src/Tests.Specs.Integration/ChatCompletion/DeleteChatSessionCommandStepDefinitions.cs rename to src/Tests.Integration/ChatCompletion/DeleteChatSessionCommandStepDefinitions.cs index 3513f37..25b81c7 100644 --- a/src/Tests.Specs.Integration/ChatCompletion/DeleteChatSessionCommandStepDefinitions.cs +++ b/src/Tests.Integration/ChatCompletion/DeleteChatSessionCommandStepDefinitions.cs @@ -1,7 +1,7 @@ using Goodtocode.AgentFramework.Core.Application.ChatCompletion; using Goodtocode.AgentFramework.Core.Domain.ChatCompletion; -namespace Goodtocode.AgentFramework.Specs.Integration.ChatCompletion +namespace Goodtocode.AgentFramework.Tests.Integration.ChatCompletion { [Binding] [Scope(Tag = "deleteChatSessionCommand")] diff --git a/src/Tests.Specs.Integration/ChatCompletion/GetChatMessageQuery.feature b/src/Tests.Integration/ChatCompletion/GetChatMessageQuery.feature similarity index 100% rename from src/Tests.Specs.Integration/ChatCompletion/GetChatMessageQuery.feature rename to src/Tests.Integration/ChatCompletion/GetChatMessageQuery.feature diff --git a/src/Tests.Specs.Integration/ChatCompletion/GetChatMessageQuery.feature.cs b/src/Tests.Integration/ChatCompletion/GetChatMessageQuery.feature.cs similarity index 99% rename from src/Tests.Specs.Integration/ChatCompletion/GetChatMessageQuery.feature.cs rename to src/Tests.Integration/ChatCompletion/GetChatMessageQuery.feature.cs index aa6efee..59eb6c9 100644 --- a/src/Tests.Specs.Integration/ChatCompletion/GetChatMessageQuery.feature.cs +++ b/src/Tests.Integration/ChatCompletion/GetChatMessageQuery.feature.cs @@ -11,7 +11,7 @@ #region Designer generated code #pragma warning disable using Reqnroll; -namespace Goodtocode.AgentFramework.Specs.Integration.ChatCompletion +namespace Goodtocode.AgentFramework.Tests.Integration.ChatCompletion { diff --git a/src/Tests.Specs.Integration/ChatCompletion/GetChatMessageQueryStepDefinitions.cs b/src/Tests.Integration/ChatCompletion/GetChatMessageQueryStepDefinitions.cs similarity index 98% rename from src/Tests.Specs.Integration/ChatCompletion/GetChatMessageQueryStepDefinitions.cs rename to src/Tests.Integration/ChatCompletion/GetChatMessageQueryStepDefinitions.cs index 781fa8f..5d50738 100644 --- a/src/Tests.Specs.Integration/ChatCompletion/GetChatMessageQueryStepDefinitions.cs +++ b/src/Tests.Integration/ChatCompletion/GetChatMessageQueryStepDefinitions.cs @@ -1,7 +1,7 @@ using Goodtocode.AgentFramework.Core.Application.ChatCompletion; using Goodtocode.AgentFramework.Core.Domain.ChatCompletion; -namespace Goodtocode.AgentFramework.Specs.Integration.ChatCompletion; +namespace Goodtocode.AgentFramework.Tests.Integration.ChatCompletion; [Binding] [Scope(Tag = "getChatMessageQuery")] diff --git a/src/Tests.Specs.Integration/ChatCompletion/GetChatMessagesPaginatedQuery.feature b/src/Tests.Integration/ChatCompletion/GetChatMessagesPaginatedQuery.feature similarity index 100% rename from src/Tests.Specs.Integration/ChatCompletion/GetChatMessagesPaginatedQuery.feature rename to src/Tests.Integration/ChatCompletion/GetChatMessagesPaginatedQuery.feature diff --git a/src/Tests.Specs.Integration/ChatCompletion/GetChatMessagesPaginatedQuery.feature.cs b/src/Tests.Integration/ChatCompletion/GetChatMessagesPaginatedQuery.feature.cs similarity index 99% rename from src/Tests.Specs.Integration/ChatCompletion/GetChatMessagesPaginatedQuery.feature.cs rename to src/Tests.Integration/ChatCompletion/GetChatMessagesPaginatedQuery.feature.cs index 9afccc9..fa7ba60 100644 --- a/src/Tests.Specs.Integration/ChatCompletion/GetChatMessagesPaginatedQuery.feature.cs +++ b/src/Tests.Integration/ChatCompletion/GetChatMessagesPaginatedQuery.feature.cs @@ -11,7 +11,7 @@ #region Designer generated code #pragma warning disable using Reqnroll; -namespace Goodtocode.AgentFramework.Specs.Integration.ChatCompletion +namespace Goodtocode.AgentFramework.Tests.Integration.ChatCompletion { diff --git a/src/Tests.Specs.Integration/ChatCompletion/GetChatMessagesPaginatedQueryStepDefinitions.cs b/src/Tests.Integration/ChatCompletion/GetChatMessagesPaginatedQueryStepDefinitions.cs similarity index 98% rename from src/Tests.Specs.Integration/ChatCompletion/GetChatMessagesPaginatedQueryStepDefinitions.cs rename to src/Tests.Integration/ChatCompletion/GetChatMessagesPaginatedQueryStepDefinitions.cs index 872cfe4..82767af 100644 --- a/src/Tests.Specs.Integration/ChatCompletion/GetChatMessagesPaginatedQueryStepDefinitions.cs +++ b/src/Tests.Integration/ChatCompletion/GetChatMessagesPaginatedQueryStepDefinitions.cs @@ -2,7 +2,7 @@ using Goodtocode.AgentFramework.Core.Domain.ChatCompletion; using Goodtocode.AgentFramework.Core.Application.ChatCompletion; -namespace Goodtocode.AgentFramework.Specs.Integration.ChatCompletion +namespace Goodtocode.AgentFramework.Tests.Integration.ChatCompletion { [Binding] [Scope(Tag = "getChatMessagesPaginatedQuery")] diff --git a/src/Tests.Specs.Integration/ChatCompletion/GetChatMessagesQuery.feature b/src/Tests.Integration/ChatCompletion/GetChatMessagesQuery.feature similarity index 100% rename from src/Tests.Specs.Integration/ChatCompletion/GetChatMessagesQuery.feature rename to src/Tests.Integration/ChatCompletion/GetChatMessagesQuery.feature diff --git a/src/Tests.Specs.Integration/ChatCompletion/GetChatMessagesQuery.feature.cs b/src/Tests.Integration/ChatCompletion/GetChatMessagesQuery.feature.cs similarity index 99% rename from src/Tests.Specs.Integration/ChatCompletion/GetChatMessagesQuery.feature.cs rename to src/Tests.Integration/ChatCompletion/GetChatMessagesQuery.feature.cs index a4afbaf..adb7d71 100644 --- a/src/Tests.Specs.Integration/ChatCompletion/GetChatMessagesQuery.feature.cs +++ b/src/Tests.Integration/ChatCompletion/GetChatMessagesQuery.feature.cs @@ -11,7 +11,7 @@ #region Designer generated code #pragma warning disable using Reqnroll; -namespace Goodtocode.AgentFramework.Specs.Integration.ChatCompletion +namespace Goodtocode.AgentFramework.Tests.Integration.ChatCompletion { diff --git a/src/Tests.Specs.Integration/ChatCompletion/GetChatMessagesQueryStepDefinitions.cs b/src/Tests.Integration/ChatCompletion/GetChatMessagesQueryStepDefinitions.cs similarity index 98% rename from src/Tests.Specs.Integration/ChatCompletion/GetChatMessagesQueryStepDefinitions.cs rename to src/Tests.Integration/ChatCompletion/GetChatMessagesQueryStepDefinitions.cs index ee64e07..e8066cf 100644 --- a/src/Tests.Specs.Integration/ChatCompletion/GetChatMessagesQueryStepDefinitions.cs +++ b/src/Tests.Integration/ChatCompletion/GetChatMessagesQueryStepDefinitions.cs @@ -1,7 +1,7 @@ using Goodtocode.AgentFramework.Core.Domain.ChatCompletion; using Goodtocode.AgentFramework.Core.Application.ChatCompletion; -namespace Goodtocode.AgentFramework.Specs.Integration.ChatCompletion; +namespace Goodtocode.AgentFramework.Tests.Integration.ChatCompletion; [Binding] [Scope(Tag = "getChatMessagesQuery")] diff --git a/src/Tests.Specs.Integration/ChatCompletion/GetChatSessionQuery.feature b/src/Tests.Integration/ChatCompletion/GetChatSessionQuery.feature similarity index 100% rename from src/Tests.Specs.Integration/ChatCompletion/GetChatSessionQuery.feature rename to src/Tests.Integration/ChatCompletion/GetChatSessionQuery.feature diff --git a/src/Tests.Specs.Integration/ChatCompletion/GetChatSessionQuery.feature.cs b/src/Tests.Integration/ChatCompletion/GetChatSessionQuery.feature.cs similarity index 99% rename from src/Tests.Specs.Integration/ChatCompletion/GetChatSessionQuery.feature.cs rename to src/Tests.Integration/ChatCompletion/GetChatSessionQuery.feature.cs index ba6d73b..448e7c6 100644 --- a/src/Tests.Specs.Integration/ChatCompletion/GetChatSessionQuery.feature.cs +++ b/src/Tests.Integration/ChatCompletion/GetChatSessionQuery.feature.cs @@ -11,7 +11,7 @@ #region Designer generated code #pragma warning disable using Reqnroll; -namespace Goodtocode.AgentFramework.Specs.Integration.ChatCompletion +namespace Goodtocode.AgentFramework.Tests.Integration.ChatCompletion { diff --git a/src/Tests.Specs.Integration/ChatCompletion/GetChatSessionQueryStepDefinitions.cs b/src/Tests.Integration/ChatCompletion/GetChatSessionQueryStepDefinitions.cs similarity index 98% rename from src/Tests.Specs.Integration/ChatCompletion/GetChatSessionQueryStepDefinitions.cs rename to src/Tests.Integration/ChatCompletion/GetChatSessionQueryStepDefinitions.cs index 50d53a1..299d5af 100644 --- a/src/Tests.Specs.Integration/ChatCompletion/GetChatSessionQueryStepDefinitions.cs +++ b/src/Tests.Integration/ChatCompletion/GetChatSessionQueryStepDefinitions.cs @@ -2,7 +2,7 @@ using System.Globalization; using Goodtocode.AgentFramework.Core.Application.ChatCompletion; -namespace Goodtocode.AgentFramework.Specs.Integration.ChatCompletion; +namespace Goodtocode.AgentFramework.Tests.Integration.ChatCompletion; [Binding] [Scope(Tag = "getChatSessionQuery")] diff --git a/src/Tests.Specs.Integration/ChatCompletion/GetChatSessionsPaginatedQuery.feature b/src/Tests.Integration/ChatCompletion/GetChatSessionsPaginatedQuery.feature similarity index 100% rename from src/Tests.Specs.Integration/ChatCompletion/GetChatSessionsPaginatedQuery.feature rename to src/Tests.Integration/ChatCompletion/GetChatSessionsPaginatedQuery.feature diff --git a/src/Tests.Specs.Integration/ChatCompletion/GetChatSessionsPaginatedQuery.feature.cs b/src/Tests.Integration/ChatCompletion/GetChatSessionsPaginatedQuery.feature.cs similarity index 99% rename from src/Tests.Specs.Integration/ChatCompletion/GetChatSessionsPaginatedQuery.feature.cs rename to src/Tests.Integration/ChatCompletion/GetChatSessionsPaginatedQuery.feature.cs index 605df4d..0b161c3 100644 --- a/src/Tests.Specs.Integration/ChatCompletion/GetChatSessionsPaginatedQuery.feature.cs +++ b/src/Tests.Integration/ChatCompletion/GetChatSessionsPaginatedQuery.feature.cs @@ -11,7 +11,7 @@ #region Designer generated code #pragma warning disable using Reqnroll; -namespace Goodtocode.AgentFramework.Specs.Integration.ChatCompletion +namespace Goodtocode.AgentFramework.Tests.Integration.ChatCompletion { diff --git a/src/Tests.Specs.Integration/ChatCompletion/GetChatSessionsPaginatedQueryStepDefinitions.cs b/src/Tests.Integration/ChatCompletion/GetChatSessionsPaginatedQueryStepDefinitions.cs similarity index 98% rename from src/Tests.Specs.Integration/ChatCompletion/GetChatSessionsPaginatedQueryStepDefinitions.cs rename to src/Tests.Integration/ChatCompletion/GetChatSessionsPaginatedQueryStepDefinitions.cs index c81bb54..723a15e 100644 --- a/src/Tests.Specs.Integration/ChatCompletion/GetChatSessionsPaginatedQueryStepDefinitions.cs +++ b/src/Tests.Integration/ChatCompletion/GetChatSessionsPaginatedQueryStepDefinitions.cs @@ -2,7 +2,7 @@ using Goodtocode.AgentFramework.Core.Domain.ChatCompletion; using Goodtocode.AgentFramework.Core.Application.ChatCompletion; -namespace Goodtocode.AgentFramework.Specs.Integration.ChatCompletion +namespace Goodtocode.AgentFramework.Tests.Integration.ChatCompletion { [Binding] [Scope(Tag = "getChatSessionsPaginatedQuery")] diff --git a/src/Tests.Specs.Integration/ChatCompletion/GetChatSessionsQuery.feature b/src/Tests.Integration/ChatCompletion/GetChatSessionsQuery.feature similarity index 100% rename from src/Tests.Specs.Integration/ChatCompletion/GetChatSessionsQuery.feature rename to src/Tests.Integration/ChatCompletion/GetChatSessionsQuery.feature diff --git a/src/Tests.Specs.Integration/ChatCompletion/GetChatSessionsQuery.feature.cs b/src/Tests.Integration/ChatCompletion/GetChatSessionsQuery.feature.cs similarity index 99% rename from src/Tests.Specs.Integration/ChatCompletion/GetChatSessionsQuery.feature.cs rename to src/Tests.Integration/ChatCompletion/GetChatSessionsQuery.feature.cs index 96c907d..de634a6 100644 --- a/src/Tests.Specs.Integration/ChatCompletion/GetChatSessionsQuery.feature.cs +++ b/src/Tests.Integration/ChatCompletion/GetChatSessionsQuery.feature.cs @@ -11,7 +11,7 @@ #region Designer generated code #pragma warning disable using Reqnroll; -namespace Goodtocode.AgentFramework.Specs.Integration.ChatCompletion +namespace Goodtocode.AgentFramework.Tests.Integration.ChatCompletion { diff --git a/src/Tests.Specs.Integration/ChatCompletion/GetChatSessionsQueryStepDefinitions.cs b/src/Tests.Integration/ChatCompletion/GetChatSessionsQueryStepDefinitions.cs similarity index 98% rename from src/Tests.Specs.Integration/ChatCompletion/GetChatSessionsQueryStepDefinitions.cs rename to src/Tests.Integration/ChatCompletion/GetChatSessionsQueryStepDefinitions.cs index eedd9f6..9415b1e 100644 --- a/src/Tests.Specs.Integration/ChatCompletion/GetChatSessionsQueryStepDefinitions.cs +++ b/src/Tests.Integration/ChatCompletion/GetChatSessionsQueryStepDefinitions.cs @@ -1,7 +1,7 @@ using Goodtocode.AgentFramework.Core.Domain.ChatCompletion; using Goodtocode.AgentFramework.Core.Application.ChatCompletion; -namespace Goodtocode.AgentFramework.Specs.Integration.ChatCompletion; +namespace Goodtocode.AgentFramework.Tests.Integration.ChatCompletion; [Binding] [Scope(Tag = "getChatSessionsQuery")] diff --git a/src/Tests.Specs.Integration/ChatCompletion/PatchChatSessionCommand.feature b/src/Tests.Integration/ChatCompletion/PatchChatSessionCommand.feature similarity index 100% rename from src/Tests.Specs.Integration/ChatCompletion/PatchChatSessionCommand.feature rename to src/Tests.Integration/ChatCompletion/PatchChatSessionCommand.feature diff --git a/src/Tests.Specs.Integration/ChatCompletion/PatchChatSessionCommand.feature.cs b/src/Tests.Integration/ChatCompletion/PatchChatSessionCommand.feature.cs similarity index 99% rename from src/Tests.Specs.Integration/ChatCompletion/PatchChatSessionCommand.feature.cs rename to src/Tests.Integration/ChatCompletion/PatchChatSessionCommand.feature.cs index 2cc836c..ab5c61f 100644 --- a/src/Tests.Specs.Integration/ChatCompletion/PatchChatSessionCommand.feature.cs +++ b/src/Tests.Integration/ChatCompletion/PatchChatSessionCommand.feature.cs @@ -11,7 +11,7 @@ #region Designer generated code #pragma warning disable using Reqnroll; -namespace Goodtocode.AgentFramework.Specs.Integration.ChatCompletion +namespace Goodtocode.AgentFramework.Tests.Integration.ChatCompletion { diff --git a/src/Tests.Specs.Integration/ChatCompletion/PatchChatSessionCommandStepDefinitions.cs b/src/Tests.Integration/ChatCompletion/PatchChatSessionCommandStepDefinitions.cs similarity index 97% rename from src/Tests.Specs.Integration/ChatCompletion/PatchChatSessionCommandStepDefinitions.cs rename to src/Tests.Integration/ChatCompletion/PatchChatSessionCommandStepDefinitions.cs index d1814e0..d5c7fbf 100644 --- a/src/Tests.Specs.Integration/ChatCompletion/PatchChatSessionCommandStepDefinitions.cs +++ b/src/Tests.Integration/ChatCompletion/PatchChatSessionCommandStepDefinitions.cs @@ -1,7 +1,7 @@ using Goodtocode.AgentFramework.Core.Application.ChatCompletion; using Goodtocode.AgentFramework.Core.Domain.ChatCompletion; -namespace Goodtocode.AgentFramework.Specs.Integration.ChatCompletion +namespace Goodtocode.AgentFramework.Tests.Integration.ChatCompletion { [Binding] [Scope(Tag = "patchChatSessionCommand")] diff --git a/src/Tests.Specs.Integration/ChatCompletion/UpdateChatSessionCommand.feature b/src/Tests.Integration/ChatCompletion/UpdateChatSessionCommand.feature similarity index 100% rename from src/Tests.Specs.Integration/ChatCompletion/UpdateChatSessionCommand.feature rename to src/Tests.Integration/ChatCompletion/UpdateChatSessionCommand.feature diff --git a/src/Tests.Specs.Integration/ChatCompletion/UpdateChatSessionCommand.feature.cs b/src/Tests.Integration/ChatCompletion/UpdateChatSessionCommand.feature.cs similarity index 99% rename from src/Tests.Specs.Integration/ChatCompletion/UpdateChatSessionCommand.feature.cs rename to src/Tests.Integration/ChatCompletion/UpdateChatSessionCommand.feature.cs index 9ec7831..26637f7 100644 --- a/src/Tests.Specs.Integration/ChatCompletion/UpdateChatSessionCommand.feature.cs +++ b/src/Tests.Integration/ChatCompletion/UpdateChatSessionCommand.feature.cs @@ -11,7 +11,7 @@ #region Designer generated code #pragma warning disable using Reqnroll; -namespace Goodtocode.AgentFramework.Specs.Integration.ChatCompletion +namespace Goodtocode.AgentFramework.Tests.Integration.ChatCompletion { diff --git a/src/Tests.Specs.Integration/ChatCompletion/UpdateChatSessionCommandStepDefinitions.cs b/src/Tests.Integration/ChatCompletion/UpdateChatSessionCommandStepDefinitions.cs similarity index 97% rename from src/Tests.Specs.Integration/ChatCompletion/UpdateChatSessionCommandStepDefinitions.cs rename to src/Tests.Integration/ChatCompletion/UpdateChatSessionCommandStepDefinitions.cs index 916ecde..ae82879 100644 --- a/src/Tests.Specs.Integration/ChatCompletion/UpdateChatSessionCommandStepDefinitions.cs +++ b/src/Tests.Integration/ChatCompletion/UpdateChatSessionCommandStepDefinitions.cs @@ -1,7 +1,7 @@ using Goodtocode.AgentFramework.Core.Application.ChatCompletion; using Goodtocode.AgentFramework.Core.Domain.ChatCompletion; -namespace Goodtocode.AgentFramework.Specs.Integration.ChatCompletion +namespace Goodtocode.AgentFramework.Tests.Integration.ChatCompletion { [Binding] [Scope(Tag = "updateChatSessionCommand")] diff --git a/src/Tests.Specs.Integration/GlobalUsings.cs b/src/Tests.Integration/GlobalUsings.cs similarity index 100% rename from src/Tests.Specs.Integration/GlobalUsings.cs rename to src/Tests.Integration/GlobalUsings.cs diff --git a/src/Tests.Specs.Integration/TestBase.cs b/src/Tests.Integration/TestBase.cs similarity index 97% rename from src/Tests.Specs.Integration/TestBase.cs rename to src/Tests.Integration/TestBase.cs index d23cefd..1757528 100644 --- a/src/Tests.Specs.Integration/TestBase.cs +++ b/src/Tests.Integration/TestBase.cs @@ -3,13 +3,13 @@ using Goodtocode.AgentFramework.Core.Domain.Auth; using Goodtocode.AgentFramework.Infrastructure.AgentFramework.Options; using Goodtocode.AgentFramework.Infrastructure.SqlServer.Persistence; -using Goodtocode.AgentFramework.Specs.Integration.Agent; +using Goodtocode.AgentFramework.Tests.Integration.Agent; using Microsoft.Agents.AI; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using System.Reflection; -namespace Goodtocode.AgentFramework.Specs.Integration; +namespace Goodtocode.AgentFramework.Tests.Integration; public abstract class TestBase : IDisposable { diff --git a/src/Tests.Specs.Integration/TestUserInfo.cs b/src/Tests.Integration/TestUserInfo.cs similarity index 91% rename from src/Tests.Specs.Integration/TestUserInfo.cs rename to src/Tests.Integration/TestUserInfo.cs index 4064f2a..4346020 100644 --- a/src/Tests.Specs.Integration/TestUserInfo.cs +++ b/src/Tests.Integration/TestUserInfo.cs @@ -1,6 +1,6 @@ using Goodtocode.AgentFramework.Core.Domain.Auth; -namespace Goodtocode.AgentFramework.Specs.Integration; +namespace Goodtocode.AgentFramework.Tests.Integration; public class TestUserInfo() : IUserEntity { diff --git a/src/Tests.Specs.Integration/Tests.Specs.Integration.csproj b/src/Tests.Integration/Tests.Integration.csproj similarity index 91% rename from src/Tests.Specs.Integration/Tests.Specs.Integration.csproj rename to src/Tests.Integration/Tests.Integration.csproj index 9e0c9ca..e2677a7 100644 --- a/src/Tests.Specs.Integration/Tests.Specs.Integration.csproj +++ b/src/Tests.Integration/Tests.Integration.csproj @@ -1,8 +1,8 @@  - Goodtocode.AgentFramework.Specs.Integration - Goodtocode.AgentFramework.Specs.Integration + Goodtocode.AgentFramework.Tests.Integration + Goodtocode.AgentFramework.Tests.Integration 1.0.0 net10.0 false diff --git a/src/Tests.Specs.Integration/appsettings.test.json b/src/Tests.Integration/appsettings.test.json similarity index 100% rename from src/Tests.Specs.Integration/appsettings.test.json rename to src/Tests.Integration/appsettings.test.json From 018592d9e2da52721ded9e6575adc7bab20a8769 Mon Sep 17 00:00:00 2001 From: Robert Good Date: Sun, 1 Feb 2026 22:16:03 -0800 Subject: [PATCH 2/4] removed admin --- src/Core.Application/ChatCompletion/CreateChatMessageCommand.cs | 2 +- .../{AdminChatMessageController.cs => ChatMessageController.cs} | 2 +- .../{AdminChatSessionController.cs => ChatSessionController.cs} | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename src/Presentation.WebApi/ChatCompletion/{AdminChatMessageController.cs => ChatMessageController.cs} (98%) rename src/Presentation.WebApi/ChatCompletion/{AdminChatSessionController.cs => ChatSessionController.cs} (99%) diff --git a/src/Core.Application/ChatCompletion/CreateChatMessageCommand.cs b/src/Core.Application/ChatCompletion/CreateChatMessageCommand.cs index 3c2cea6..d75107a 100644 --- a/src/Core.Application/ChatCompletion/CreateChatMessageCommand.cs +++ b/src/Core.Application/ChatCompletion/CreateChatMessageCommand.cs @@ -53,7 +53,7 @@ public async Task Handle(CreateChatMessageCommand request, Cance chatSession.Messages.Add(chatMessage); _context.ChatMessages.Add(chatMessage); - var agentReply = response.Contents.LastOrDefault().ToString() ?? string.Empty; + var agentReply = (response?.Contents?.LastOrDefault()?.ToString()) ?? string.Empty; var chatMessageResponse = ChatMessageEntity.Create( Guid.NewGuid(), diff --git a/src/Presentation.WebApi/ChatCompletion/AdminChatMessageController.cs b/src/Presentation.WebApi/ChatCompletion/ChatMessageController.cs similarity index 98% rename from src/Presentation.WebApi/ChatCompletion/AdminChatMessageController.cs rename to src/Presentation.WebApi/ChatCompletion/ChatMessageController.cs index 49030c5..d338d5f 100644 --- a/src/Presentation.WebApi/ChatCompletion/AdminChatMessageController.cs +++ b/src/Presentation.WebApi/ChatCompletion/ChatMessageController.cs @@ -13,7 +13,7 @@ namespace Goodtocode.AgentFramework.Presentation.WebApi.ChatCompletion; [Route("api/v{version:apiVersion}/admin/messages")] [ApiVersion("1.0")] [Authorize] -public class AdminChatMessageController : ApiControllerBase +public class ChatMessageController : ApiControllerBase { /// Get Chat Message /// diff --git a/src/Presentation.WebApi/ChatCompletion/AdminChatSessionController.cs b/src/Presentation.WebApi/ChatCompletion/ChatSessionController.cs similarity index 99% rename from src/Presentation.WebApi/ChatCompletion/AdminChatSessionController.cs rename to src/Presentation.WebApi/ChatCompletion/ChatSessionController.cs index cf4ae55..3c7a4c8 100644 --- a/src/Presentation.WebApi/ChatCompletion/AdminChatSessionController.cs +++ b/src/Presentation.WebApi/ChatCompletion/ChatSessionController.cs @@ -13,7 +13,7 @@ namespace Goodtocode.AgentFramework.Presentation.WebApi.ChatCompletion; [Route("api/v{version:apiVersion}/admin/sessions")] [ApiVersion("1.0")] [Authorize] -public class AdminChatSessionController : ApiControllerBase +public class ChatSessionController : ApiControllerBase { /// Get Chat Session with history /// From ff6501a4a231f81442b7a6045feecc81d3dc5529 Mon Sep 17 00:00:00 2001 From: Robert Good Date: Mon, 2 Feb 2026 23:36:50 -0800 Subject: [PATCH 3/4] Specs to tests --- .azure/modules/azoai-azureopenai.bicep | 36 +++++++++++++++++++ .github/copilot-instructions.md | 2 +- .../gtc-agent-standalone-web-api-sql.yml | 4 +-- README.md | 14 ++++---- src/Goodtocode.AgentFramework.WebApi.sln | 2 +- .../Tests.Integration.csproj | 5 --- 6 files changed, 47 insertions(+), 16 deletions(-) create mode 100644 .azure/modules/azoai-azureopenai.bicep diff --git a/.azure/modules/azoai-azureopenai.bicep b/.azure/modules/azoai-azureopenai.bicep new file mode 100644 index 0000000..8702a59 --- /dev/null +++ b/.azure/modules/azoai-azureopenai.bicep @@ -0,0 +1,36 @@ +@description('Name of the Azure OpenAI instance. Must be globally unique and 3-63 characters, using only lowercase letters, numbers, and hyphens, starting and ending with a letter or number.') +@minLength(3) +@maxLength(63) +param name string + +@description('Location for the Azure OpenAI resource.') +param location string + +@description('Tags to apply to the Azure OpenAI resource.') +param tags object = {} + +@description('SKU for Azure OpenAI. Allowed values: Standard, Default is Standard.') +@allowed([ + 'Standard' +]) +param sku string = 'Standard' + +resource azoai 'Microsoft.CognitiveServices/accounts@2023-05-01' = { + name: name + location: location + tags: tags + kind: 'OpenAI' + sku: { + name: sku + } + properties: { + apiProperties: { + enableDynamicThrottling: true + } + networkAcls: { + defaultAction: 'Allow' + } + } +} + +output id string = azoai.id diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 68a94e6..1fd8776 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -15,7 +15,7 @@ ## Developer Workflows - **Build:** Use `build.cmd` or `build.sh` in `src/` to build the solution. -- **Test:** Integration specs in `src/gherkin Tests.Specs.Integration/` and `src/Tests.Specs.Integration/`. +- **Test:** Integration specs in `src/gherkin Tests.Integration/` and `src/Tests.Integration/`. - **Run:** Launch via Visual Studio or `dotnet run` from solution root. - **CI/CD:** Managed by GitHub Actions (`.github/workflows/`). - **IaC Deploy:** See `can-digital-insights-iac.yml` for infrastructure deployment. diff --git a/.github/workflows/gtc-agent-standalone-web-api-sql.yml b/.github/workflows/gtc-agent-standalone-web-api-sql.yml index 8351061..e2e0885 100644 --- a/.github/workflows/gtc-agent-standalone-web-api-sql.yml +++ b/.github/workflows/gtc-agent-standalone-web-api-sql.yml @@ -52,8 +52,8 @@ jobs: SRC_SLN: "Goodtocode.AgentFramework.Blazor.sln" API_PATH: "Presentation.WebApi" API_PROJECT: "Presentation.WebApi.csproj" - TEST_PATH: "Tests.Specs.Integration" - TEST_PROJECT: "Tests.Specs.Integration.csproj" + TEST_PATH: "Tests.Integration" + TEST_PROJECT: "Tests.Integration.csproj" WEB_PATH: "Presentation.Blazor" WEB_PROJECT: "Presentation.Blazor.csproj" INFRA_PATH: 'Infrastructure.SqlServer' diff --git a/README.md b/README.md index 8850723..4a30ecb 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ To get started, follow the steps below: dotnet user-secrets set "OpenAI:ApiKey" "YOUR_API_KEY" ``` ``` - cd ../Tests.Specs.Integration + cd ../Tests.Integration dotnet user-secrets set "OpenAI:ApiKey" "YOUR_API_KEY" ``` 5. Create your SQL Server database & schema (via *dotnet ef* command) @@ -89,9 +89,9 @@ To get started, follow the steps below: cd ../../ dotnet ef database update --project .\src\Infrastructure.SqlServer\Infrastructure.SqlServer.csproj --startup-project .\src\Presentation.WebApi\Presentation.WebApi.csproj --context AgentFrameworkContext --connection "Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=AgentFramework;Min Pool Size=3;MultipleActiveResultSets=True;Trusted_Connection=Yes;TrustServerCertificate=True;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30" ``` -6. Run Tests (Tests.Specs.Integration) +6. Run Tests (Tests.Integration) ``` - cd src/Tests.Specs.Integration + cd src/Tests.Integration dotnet test ``` 7. Run Blazor Web Chat Client (Presentation.Blazor) and Web API (Presentation.WebApi) @@ -214,14 +214,14 @@ Follow these steps to get your development environment set up: ``` ## Setup Azure Open AI or Open AI configuration -**Important:** Do this for both Presentation.WebApi and Tests.Specs.Integration +**Important:** Do this for both Presentation.WebApi and Tests.Integration ### Azure Open AI ``` cd src/Presentation.WebApi dotnet user-secrets set "AzureOpenAI:ChatDeploymentName" "gpt-4" dotnet user-secrets set "AzureOpenAI:Endpoint" "https://YOUR_ENDPOINT.openai.azure.com/" dotnet user-secrets set "AzureOpenAI:ApiKey" "YOUR_API_KEY" -cd ../Tests.Specs.Integration +cd ../Tests.Integration dotnet user-secrets set "AzureOpenAI:ChatDeploymentName" "gpt-4" dotnet user-secrets set "AzureOpenAI:Endpoint" "https://YOUR_ENDPOINT.openai.azure.com/" dotnet user-secrets set "AzureOpenAI:ApiKey" "YOUR_API_KEY" @@ -234,11 +234,11 @@ AzureOpenAI__ApiKey ``` ### Open AI -Set API Key in both Presentation.WebApi and Tests.Specs.Integration projects +Set API Key in both Presentation.WebApi and Tests.Integration projects ``` cd src/Presentation.WebApi dotnet user-secrets set "OpenAI:ApiKey" "YOUR_API_KEY" -cd ../Tests.Specs.Integration +cd ../Tests.Integration dotnet user-secrets set "OpenAI:ApiKey" "YOUR_API_KEY" ``` Alternately you can set in Environment variables diff --git a/src/Goodtocode.AgentFramework.WebApi.sln b/src/Goodtocode.AgentFramework.WebApi.sln index fe68975..c17f188 100644 --- a/src/Goodtocode.AgentFramework.WebApi.sln +++ b/src/Goodtocode.AgentFramework.WebApi.sln @@ -13,7 +13,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Infrastructure.SqlServer", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Infrastructure.AgentFramework", "Infrastructure.AgentFramework\Infrastructure.AgentFramework.csproj", "{2091EF1C-2E75-488C-A822-9628E639FB98}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests.Specs.Integration", "Tests.Specs.Integration\Tests.Specs.Integration.csproj", "{5DD2A9DC-4CE9-4E47-BE7D-7EEF208D287F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests.Integration", "Tests.Integration\Tests.Integration.csproj", "{5DD2A9DC-4CE9-4E47-BE7D-7EEF208D287F}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/src/Tests.Integration/Tests.Integration.csproj b/src/Tests.Integration/Tests.Integration.csproj index e2677a7..e764b25 100644 --- a/src/Tests.Integration/Tests.Integration.csproj +++ b/src/Tests.Integration/Tests.Integration.csproj @@ -11,11 +11,6 @@ 998fefad-d248-4bad-9d33-8a060711dd88 - - - - - PreserveNewest From 7b69315f1e096aac1a0432ef86eaf310217c8181 Mon Sep 17 00:00:00 2001 From: Robert Good Date: Tue, 3 Feb 2026 22:49:57 -0800 Subject: [PATCH 4/4] migration and removed interface --- .../Abstractions/IActorsPlugin.cs | 2 +- .../Abstractions/IChatMessagesPlugin.cs | 2 +- .../Abstractions/IChatSessionsPlugin.cs | 2 +- .../Abstractions/ISemanticPluginCompatible.cs | 8 - .../Tools/ActorsTool.cs | 2 +- .../Tools/ChatMessagesTool.cs | 3 +- .../Tools/ChatSessionsTool.cs | 2 +- .../20260204064841_InitialCreate.Designer.cs | 203 ++ .../20260204064841_InitialCreate.cs | 156 + .../AgentFrameworkContextModelSnapshot.cs | 200 ++ .../Clients/BackendApiClient.g.cs | 2657 ++--------------- .../Presentation.WebApi.csproj | 2 +- 12 files changed, 776 insertions(+), 2463 deletions(-) delete mode 100644 src/Core.Application/Abstractions/ISemanticPluginCompatible.cs create mode 100644 src/Infrastructure.SqlServer/Migrations/20260204064841_InitialCreate.Designer.cs create mode 100644 src/Infrastructure.SqlServer/Migrations/20260204064841_InitialCreate.cs create mode 100644 src/Infrastructure.SqlServer/Migrations/AgentFrameworkContextModelSnapshot.cs diff --git a/src/Core.Application/Abstractions/IActorsPlugin.cs b/src/Core.Application/Abstractions/IActorsPlugin.cs index 26eb431..419a81d 100644 --- a/src/Core.Application/Abstractions/IActorsPlugin.cs +++ b/src/Core.Application/Abstractions/IActorsPlugin.cs @@ -1,6 +1,6 @@ namespace Goodtocode.AgentFramework.Core.Application.Abstractions; -public interface IActorsPlugin : ISemanticPluginCompatible +public interface IActorsPlugin { Task GetActorByIdAsync(Guid actorId, CancellationToken cancellationToken); Task> GetActorsByNameAsync(string name, CancellationToken cancellationToken); diff --git a/src/Core.Application/Abstractions/IChatMessagesPlugin.cs b/src/Core.Application/Abstractions/IChatMessagesPlugin.cs index cbd022e..cde237b 100644 --- a/src/Core.Application/Abstractions/IChatMessagesPlugin.cs +++ b/src/Core.Application/Abstractions/IChatMessagesPlugin.cs @@ -1,6 +1,6 @@ namespace Goodtocode.AgentFramework.Core.Application.Abstractions; -public interface IChatMessagesPlugin : ISemanticPluginCompatible +public interface IChatMessagesPlugin { Task> ListRecentMessagesAsync(DateTime? startDate, DateTime? endDate, CancellationToken cancellationToken); Task> GetChatMessagesAsync(Guid sessionId, CancellationToken cancellationToken); diff --git a/src/Core.Application/Abstractions/IChatSessionsPlugin.cs b/src/Core.Application/Abstractions/IChatSessionsPlugin.cs index ee6d288..2b6b700 100644 --- a/src/Core.Application/Abstractions/IChatSessionsPlugin.cs +++ b/src/Core.Application/Abstractions/IChatSessionsPlugin.cs @@ -1,6 +1,6 @@ namespace Goodtocode.AgentFramework.Core.Application.Abstractions; -public interface IChatSessionsPlugin : ISemanticPluginCompatible +public interface IChatSessionsPlugin { Task> ListRecentSessionsAsync(DateTime? startDate, DateTime? endDate, CancellationToken cancellationToken); Task UpdateChatSessionTitleAsync(Guid sessionId, string newTitle, CancellationToken cancellationToken); diff --git a/src/Core.Application/Abstractions/ISemanticPluginCompatible.cs b/src/Core.Application/Abstractions/ISemanticPluginCompatible.cs deleted file mode 100644 index d10bc56..0000000 --- a/src/Core.Application/Abstractions/ISemanticPluginCompatible.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Goodtocode.AgentFramework.Core.Application.Abstractions; - -public interface ISemanticPluginCompatible -{ - string PluginName { get; } - string FunctionName { get; } - Dictionary Parameters { get; } -} \ No newline at end of file diff --git a/src/Infrastructure.AgentFramework/Tools/ActorsTool.cs b/src/Infrastructure.AgentFramework/Tools/ActorsTool.cs index e4ef760..cecb990 100644 --- a/src/Infrastructure.AgentFramework/Tools/ActorsTool.cs +++ b/src/Infrastructure.AgentFramework/Tools/ActorsTool.cs @@ -19,7 +19,7 @@ public sealed class ActorsTool(IServiceProvider serviceProvider) : AITool, IActo { private readonly IServiceProvider _serviceProvider = serviceProvider; - public string PluginName => "AuthorsPlugin"; + public static string PluginName => "AuthorsPlugin"; public string FunctionName => _currentFunctionName; public Dictionary Parameters => _currentParameters; diff --git a/src/Infrastructure.AgentFramework/Tools/ChatMessagesTool.cs b/src/Infrastructure.AgentFramework/Tools/ChatMessagesTool.cs index f265ffd..c092118 100644 --- a/src/Infrastructure.AgentFramework/Tools/ChatMessagesTool.cs +++ b/src/Infrastructure.AgentFramework/Tools/ChatMessagesTool.cs @@ -2,7 +2,6 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.AI; using Microsoft.Extensions.DependencyInjection; -using Microsoft.SemanticKernel; using System.ComponentModel; namespace Goodtocode.AgentFramework.Infrastructure.AgentFramework.Tools; @@ -11,7 +10,7 @@ public sealed class ChatMessagesTool(IServiceProvider serviceProvider) : AITool, { private readonly IServiceProvider _serviceProvider = serviceProvider; - public string PluginName => "ChatMessagesPlugin"; + public static string PluginName => "ChatMessagesPlugin"; public string FunctionName => _currentFunctionName; public Dictionary Parameters => _currentParameters; diff --git a/src/Infrastructure.AgentFramework/Tools/ChatSessionsTool.cs b/src/Infrastructure.AgentFramework/Tools/ChatSessionsTool.cs index d5c501f..3421da3 100644 --- a/src/Infrastructure.AgentFramework/Tools/ChatSessionsTool.cs +++ b/src/Infrastructure.AgentFramework/Tools/ChatSessionsTool.cs @@ -10,7 +10,7 @@ public sealed class ChatSessionsTool(IServiceProvider serviceProvider) : AITool, { private readonly IServiceProvider _serviceProvider = serviceProvider; - public string PluginName => "ChatSessionsPlugin"; + public static string PluginName => "ChatSessionsPlugin"; public string FunctionName => _currentFunctionName; public Dictionary Parameters => _currentParameters; diff --git a/src/Infrastructure.SqlServer/Migrations/20260204064841_InitialCreate.Designer.cs b/src/Infrastructure.SqlServer/Migrations/20260204064841_InitialCreate.Designer.cs new file mode 100644 index 0000000..c7f9da6 --- /dev/null +++ b/src/Infrastructure.SqlServer/Migrations/20260204064841_InitialCreate.Designer.cs @@ -0,0 +1,203 @@ +// +using System; +using Goodtocode.AgentFramework.Infrastructure.SqlServer.Persistence; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Goodtocode.AgentFramework.Infrastructure.SqlServer.Migrations +{ + [DbContext(typeof(AgentFrameworkContext))] + [Migration("20260204064841_InitialCreate")] + partial class InitialCreate + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "10.0.2") + .HasAnnotation("Proxies:ChangeTracking", false) + .HasAnnotation("Proxies:CheckEquality", false) + .HasAnnotation("Proxies:LazyLoading", true) + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Goodtocode.AgentFramework.Core.Domain.Actor.ActorEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreatedOn") + .HasColumnType("datetime2"); + + b.Property("DeletedOn") + .HasColumnType("datetime2"); + + b.Property("Email") + .HasColumnType("NVARCHAR(200)"); + + b.Property("FirstName") + .HasColumnType("NVARCHAR(200)"); + + b.Property("LastName") + .HasColumnType("NVARCHAR(200)"); + + b.Property("ModifiedOn") + .HasColumnType("datetime2"); + + b.Property("OwnerId") + .HasColumnType("UNIQUEIDENTIFIER"); + + b.Property("TenantId") + .HasColumnType("UNIQUEIDENTIFIER"); + + b.Property("Timestamp") + .HasColumnType("datetimeoffset"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("Id") + .IsUnique(); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("Id"), false); + + b.HasIndex("Timestamp") + .IsUnique(); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("Timestamp")); + + b.HasIndex("TenantId", "OwnerId") + .IsUnique(); + + b.ToTable("Actors", (string)null); + }); + + modelBuilder.Entity("Goodtocode.AgentFramework.Core.Domain.ChatCompletion.ChatMessageEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ChatSessionId") + .HasColumnType("uniqueidentifier"); + + b.Property("Content") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreatedOn") + .HasColumnType("datetime2"); + + b.Property("DeletedOn") + .HasColumnType("datetime2"); + + b.Property("ModifiedOn") + .HasColumnType("datetime2"); + + b.Property("Role") + .HasColumnType("int"); + + b.Property("Timestamp") + .HasColumnType("datetimeoffset"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("ChatSessionId"); + + b.HasIndex("Id") + .IsUnique(); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("Id"), false); + + b.HasIndex("Timestamp") + .IsUnique(); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("Timestamp")); + + b.ToTable("ChatMessages", (string)null); + }); + + modelBuilder.Entity("Goodtocode.AgentFramework.Core.Domain.ChatCompletion.ChatSessionEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ActorId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreatedOn") + .HasColumnType("datetime2"); + + b.Property("DeletedOn") + .HasColumnType("datetime2"); + + b.Property("ModifiedOn") + .HasColumnType("datetime2"); + + b.Property("Timestamp") + .HasColumnType("datetimeoffset"); + + b.Property("Title") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("ActorId"); + + b.HasIndex("Id") + .IsUnique(); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("Id"), false); + + b.HasIndex("Timestamp") + .IsUnique(); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("Timestamp")); + + b.ToTable("ChatSessions", (string)null); + }); + + modelBuilder.Entity("Goodtocode.AgentFramework.Core.Domain.ChatCompletion.ChatMessageEntity", b => + { + b.HasOne("Goodtocode.AgentFramework.Core.Domain.ChatCompletion.ChatSessionEntity", "ChatSession") + .WithMany("Messages") + .HasForeignKey("ChatSessionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ChatSession"); + }); + + modelBuilder.Entity("Goodtocode.AgentFramework.Core.Domain.ChatCompletion.ChatSessionEntity", b => + { + b.HasOne("Goodtocode.AgentFramework.Core.Domain.Actor.ActorEntity", "Actor") + .WithMany() + .HasForeignKey("ActorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Actor"); + }); + + modelBuilder.Entity("Goodtocode.AgentFramework.Core.Domain.ChatCompletion.ChatSessionEntity", b => + { + b.Navigation("Messages"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Infrastructure.SqlServer/Migrations/20260204064841_InitialCreate.cs b/src/Infrastructure.SqlServer/Migrations/20260204064841_InitialCreate.cs new file mode 100644 index 0000000..7c6c9f2 --- /dev/null +++ b/src/Infrastructure.SqlServer/Migrations/20260204064841_InitialCreate.cs @@ -0,0 +1,156 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Goodtocode.AgentFramework.Infrastructure.SqlServer.Migrations +{ + /// + public partial class InitialCreate : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "Actors", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + FirstName = table.Column(type: "NVARCHAR(200)", nullable: true), + LastName = table.Column(type: "NVARCHAR(200)", nullable: true), + Email = table.Column(type: "NVARCHAR(200)", nullable: true), + CreatedOn = table.Column(type: "datetime2", nullable: false), + ModifiedOn = table.Column(type: "datetime2", nullable: true), + DeletedOn = table.Column(type: "datetime2", nullable: true), + Timestamp = table.Column(type: "datetimeoffset", nullable: false), + OwnerId = table.Column(type: "UNIQUEIDENTIFIER", nullable: false), + TenantId = table.Column(type: "UNIQUEIDENTIFIER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Actors", x => x.Id) + .Annotation("SqlServer:Clustered", false); + }); + + migrationBuilder.CreateTable( + name: "ChatSessions", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ActorId = table.Column(type: "uniqueidentifier", nullable: false), + Title = table.Column(type: "nvarchar(max)", nullable: true), + CreatedOn = table.Column(type: "datetime2", nullable: false), + ModifiedOn = table.Column(type: "datetime2", nullable: true), + DeletedOn = table.Column(type: "datetime2", nullable: true), + Timestamp = table.Column(type: "datetimeoffset", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ChatSessions", x => x.Id) + .Annotation("SqlServer:Clustered", false); + table.ForeignKey( + name: "FK_ChatSessions_Actors_ActorId", + column: x => x.ActorId, + principalTable: "Actors", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "ChatMessages", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ChatSessionId = table.Column(type: "uniqueidentifier", nullable: false), + Role = table.Column(type: "int", nullable: false), + Content = table.Column(type: "nvarchar(max)", nullable: false), + CreatedOn = table.Column(type: "datetime2", nullable: false), + ModifiedOn = table.Column(type: "datetime2", nullable: true), + DeletedOn = table.Column(type: "datetime2", nullable: true), + Timestamp = table.Column(type: "datetimeoffset", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ChatMessages", x => x.Id) + .Annotation("SqlServer:Clustered", false); + table.ForeignKey( + name: "FK_ChatMessages_ChatSessions_ChatSessionId", + column: x => x.ChatSessionId, + principalTable: "ChatSessions", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_Actors_Id", + table: "Actors", + column: "Id", + unique: true) + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.CreateIndex( + name: "IX_Actors_TenantId_OwnerId", + table: "Actors", + columns: new[] { "TenantId", "OwnerId" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Actors_Timestamp", + table: "Actors", + column: "Timestamp", + unique: true) + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ChatMessages_ChatSessionId", + table: "ChatMessages", + column: "ChatSessionId"); + + migrationBuilder.CreateIndex( + name: "IX_ChatMessages_Id", + table: "ChatMessages", + column: "Id", + unique: true) + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.CreateIndex( + name: "IX_ChatMessages_Timestamp", + table: "ChatMessages", + column: "Timestamp", + unique: true) + .Annotation("SqlServer:Clustered", true); + + migrationBuilder.CreateIndex( + name: "IX_ChatSessions_ActorId", + table: "ChatSessions", + column: "ActorId"); + + migrationBuilder.CreateIndex( + name: "IX_ChatSessions_Id", + table: "ChatSessions", + column: "Id", + unique: true) + .Annotation("SqlServer:Clustered", false); + + migrationBuilder.CreateIndex( + name: "IX_ChatSessions_Timestamp", + table: "ChatSessions", + column: "Timestamp", + unique: true) + .Annotation("SqlServer:Clustered", true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "ChatMessages"); + + migrationBuilder.DropTable( + name: "ChatSessions"); + + migrationBuilder.DropTable( + name: "Actors"); + } + } +} diff --git a/src/Infrastructure.SqlServer/Migrations/AgentFrameworkContextModelSnapshot.cs b/src/Infrastructure.SqlServer/Migrations/AgentFrameworkContextModelSnapshot.cs new file mode 100644 index 0000000..1da18c0 --- /dev/null +++ b/src/Infrastructure.SqlServer/Migrations/AgentFrameworkContextModelSnapshot.cs @@ -0,0 +1,200 @@ +// +using System; +using Goodtocode.AgentFramework.Infrastructure.SqlServer.Persistence; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Goodtocode.AgentFramework.Infrastructure.SqlServer.Migrations +{ + [DbContext(typeof(AgentFrameworkContext))] + partial class AgentFrameworkContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "10.0.2") + .HasAnnotation("Proxies:ChangeTracking", false) + .HasAnnotation("Proxies:CheckEquality", false) + .HasAnnotation("Proxies:LazyLoading", true) + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Goodtocode.AgentFramework.Core.Domain.Actor.ActorEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreatedOn") + .HasColumnType("datetime2"); + + b.Property("DeletedOn") + .HasColumnType("datetime2"); + + b.Property("Email") + .HasColumnType("NVARCHAR(200)"); + + b.Property("FirstName") + .HasColumnType("NVARCHAR(200)"); + + b.Property("LastName") + .HasColumnType("NVARCHAR(200)"); + + b.Property("ModifiedOn") + .HasColumnType("datetime2"); + + b.Property("OwnerId") + .HasColumnType("UNIQUEIDENTIFIER"); + + b.Property("TenantId") + .HasColumnType("UNIQUEIDENTIFIER"); + + b.Property("Timestamp") + .HasColumnType("datetimeoffset"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("Id") + .IsUnique(); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("Id"), false); + + b.HasIndex("Timestamp") + .IsUnique(); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("Timestamp")); + + b.HasIndex("TenantId", "OwnerId") + .IsUnique(); + + b.ToTable("Actors", (string)null); + }); + + modelBuilder.Entity("Goodtocode.AgentFramework.Core.Domain.ChatCompletion.ChatMessageEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ChatSessionId") + .HasColumnType("uniqueidentifier"); + + b.Property("Content") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreatedOn") + .HasColumnType("datetime2"); + + b.Property("DeletedOn") + .HasColumnType("datetime2"); + + b.Property("ModifiedOn") + .HasColumnType("datetime2"); + + b.Property("Role") + .HasColumnType("int"); + + b.Property("Timestamp") + .HasColumnType("datetimeoffset"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("ChatSessionId"); + + b.HasIndex("Id") + .IsUnique(); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("Id"), false); + + b.HasIndex("Timestamp") + .IsUnique(); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("Timestamp")); + + b.ToTable("ChatMessages", (string)null); + }); + + modelBuilder.Entity("Goodtocode.AgentFramework.Core.Domain.ChatCompletion.ChatSessionEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ActorId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreatedOn") + .HasColumnType("datetime2"); + + b.Property("DeletedOn") + .HasColumnType("datetime2"); + + b.Property("ModifiedOn") + .HasColumnType("datetime2"); + + b.Property("Timestamp") + .HasColumnType("datetimeoffset"); + + b.Property("Title") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false); + + b.HasIndex("ActorId"); + + b.HasIndex("Id") + .IsUnique(); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("Id"), false); + + b.HasIndex("Timestamp") + .IsUnique(); + + SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("Timestamp")); + + b.ToTable("ChatSessions", (string)null); + }); + + modelBuilder.Entity("Goodtocode.AgentFramework.Core.Domain.ChatCompletion.ChatMessageEntity", b => + { + b.HasOne("Goodtocode.AgentFramework.Core.Domain.ChatCompletion.ChatSessionEntity", "ChatSession") + .WithMany("Messages") + .HasForeignKey("ChatSessionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ChatSession"); + }); + + modelBuilder.Entity("Goodtocode.AgentFramework.Core.Domain.ChatCompletion.ChatSessionEntity", b => + { + b.HasOne("Goodtocode.AgentFramework.Core.Domain.Actor.ActorEntity", "Actor") + .WithMany() + .HasForeignKey("ActorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Actor"); + }); + + modelBuilder.Entity("Goodtocode.AgentFramework.Core.Domain.ChatCompletion.ChatSessionEntity", b => + { + b.Navigation("Messages"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Presentation.Blazor/Clients/BackendApiClient.g.cs b/src/Presentation.Blazor/Clients/BackendApiClient.g.cs index 3389a68..687c47b 100644 --- a/src/Presentation.Blazor/Clients/BackendApiClient.g.cs +++ b/src/Presentation.Blazor/Clients/BackendApiClient.g.cs @@ -73,7 +73,7 @@ public string BaseUrl partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); /// - /// Get Text Audio with history + /// Get Chat Message /// /// /// Sample request: @@ -83,14 +83,14 @@ public string BaseUrl /// /// OK /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetTextAudioQueryAsync(System.Guid id) + public virtual System.Threading.Tasks.Task GetChatMessageQueryAsync(System.Guid id) { - return GetTextAudioQueryAsync(id, System.Threading.CancellationToken.None); + return GetChatMessageQueryAsync(id, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// - /// Get Text Audio with history + /// Get Chat Message /// /// /// Sample request: @@ -100,7 +100,7 @@ public virtual System.Threading.Tasks.Task GetTextAudioQueryAsync( /// /// OK /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetTextAudioQueryAsync(System.Guid id, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetChatMessageQueryAsync(System.Guid id, System.Threading.CancellationToken cancellationToken) { if (id == null) throw new System.ArgumentNullException("id"); @@ -116,8 +116,8 @@ public virtual async System.Threading.Tasks.Task GetTextAudioQuery var urlBuilder_ = new System.Text.StringBuilder(); if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); - // Operation Path: "api/v1/admin/audio/{id}" - urlBuilder_.Append("api/v1/admin/audio/"); + // Operation Path: "api/v1/admin/messages/{id}" + urlBuilder_.Append("api/v1/admin/messages/"); urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); PrepareRequest(client_, request_, urlBuilder_); @@ -145,7 +145,7 @@ public virtual async System.Threading.Tasks.Task GetTextAudioQuery var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -203,131 +203,7 @@ public virtual async System.Threading.Tasks.Task GetTextAudioQuery } /// - /// Remove Audio Command - /// - /// - /// Sample request: - ///
- ///
"Id": 60fb5e99-3a78-43df-a512-7d8ff498499e - ///
"api-version": 1.0 - ///
- /// No Content - /// A server side error occurred. - public virtual System.Threading.Tasks.Task RemoveTextAudioCommandAsync(System.Guid id) - { - return RemoveTextAudioCommandAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// - /// Remove Audio Command - /// - /// - /// Sample request: - ///
- ///
"Id": 60fb5e99-3a78-43df-a512-7d8ff498499e - ///
"api-version": 1.0 - ///
- /// No Content - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task RemoveTextAudioCommandAsync(System.Guid id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - - var urlBuilder_ = new System.Text.StringBuilder(); - if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); - // Operation Path: "api/v1/admin/audio/{id}" - urlBuilder_.Append("api/v1/admin/audio/"); - urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = new System.Collections.Generic.Dictionary>(); - foreach (var item_ in response_.Headers) - headers_[item_.Key] = item_.Value; - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 204) - { - return; - } - else - if (status_ == 401) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 404) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); - throw new ApiException("Internal Server Error", status_, responseText_, headers_, null); - } - else - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// - /// Get All Text Audios Query + /// Get All Chat Messages for a session Query /// /// /// Sample request: @@ -338,14 +214,14 @@ public virtual async System.Threading.Tasks.Task RemoveTextAudioCommandAsync(Sys /// /// OK /// A server side error occurred. - public virtual System.Threading.Tasks.Task> GetTextAudiosQueryAsync() + public virtual System.Threading.Tasks.Task> GetChatMessagesQueryAsync() { - return GetTextAudiosQueryAsync(System.Threading.CancellationToken.None); + return GetChatMessagesQueryAsync(System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// - /// Get All Text Audios Query + /// Get All Chat Messages for a session Query /// /// /// Sample request: @@ -356,7 +232,7 @@ public virtual async System.Threading.Tasks.Task RemoveTextAudioCommandAsync(Sys /// /// OK /// A server side error occurred. - public virtual async System.Threading.Tasks.Task> GetTextAudiosQueryAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task> GetChatMessagesQueryAsync(System.Threading.CancellationToken cancellationToken) { var client_ = _httpClient; var disposeClient_ = false; @@ -369,8 +245,8 @@ public virtual async System.Threading.Tasks.Task RemoveTextAudioCommandAsync(Sys var urlBuilder_ = new System.Text.StringBuilder(); if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); - // Operation Path: "api/v1/admin/audio" - urlBuilder_.Append("api/v1/admin/audio"); + // Operation Path: "api/v1/admin/messages" + urlBuilder_.Append("api/v1/admin/messages"); PrepareRequest(client_, request_, urlBuilder_); @@ -397,7 +273,7 @@ public virtual async System.Threading.Tasks.Task RemoveTextAudioCommandAsync(Sys var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -455,10 +331,17 @@ public virtual async System.Threading.Tasks.Task RemoveTextAudioCommandAsync(Sys } /// - /// Creates new Audio from Text + /// Creates new Chat Message with initial message prompt/response history /// /// - /// Sample request: + /// Types of Chat Completion are: + ///
1. Informational Prompt: A prompt requesting information + ///
- Example Prompt: "What's the capital of France?" + ///
- Example Response: "The capital of France is Paris." + ///
2. Multiple Choice Prompt: A prompt with instructions for multiple-choice responses. + ///
- Example Prompt: “Choose an activity for the weekend: a) Hiking b) Movie night c) Cooking class d) Board games” + ///
- Example Response: “I'd recommend hiking! It's a great way to enjoy nature and get some exercise.” + ///
Sample request: ///
///
HttpPost Body ///
{ @@ -470,17 +353,24 @@ public virtual async System.Threading.Tasks.Task RemoveTextAudioCommandAsync(Sys ///
/// Created /// A server side error occurred. - public virtual System.Threading.Tasks.Task CreateTextToAudioCommandAsync(CreateTextToAudioCommand body) + public virtual System.Threading.Tasks.Task CreateChatMessageCommandAsync(CreateChatMessageCommand body) { - return CreateTextToAudioCommandAsync(body, System.Threading.CancellationToken.None); + return CreateChatMessageCommandAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// - /// Creates new Audio from Text + /// Creates new Chat Message with initial message prompt/response history /// /// - /// Sample request: + /// Types of Chat Completion are: + ///
1. Informational Prompt: A prompt requesting information + ///
- Example Prompt: "What's the capital of France?" + ///
- Example Response: "The capital of France is Paris." + ///
2. Multiple Choice Prompt: A prompt with instructions for multiple-choice responses. + ///
- Example Prompt: “Choose an activity for the weekend: a) Hiking b) Movie night c) Cooking class d) Board games” + ///
- Example Response: “I'd recommend hiking! It's a great way to enjoy nature and get some exercise.” + ///
Sample request: ///
///
HttpPost Body ///
{ @@ -492,7 +382,7 @@ public virtual System.Threading.Tasks.Task CreateTextToAudioComman ///
/// Created /// A server side error occurred. - public virtual async System.Threading.Tasks.Task CreateTextToAudioCommandAsync(CreateTextToAudioCommand body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task CreateChatMessageCommandAsync(CreateChatMessageCommand body, System.Threading.CancellationToken cancellationToken) { var client_ = _httpClient; var disposeClient_ = false; @@ -509,8 +399,8 @@ public virtual async System.Threading.Tasks.Task CreateTextToAudio var urlBuilder_ = new System.Text.StringBuilder(); if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); - // Operation Path: "api/v1/admin/audio" - urlBuilder_.Append("api/v1/admin/audio"); + // Operation Path: "api/v1/admin/messages" + urlBuilder_.Append("api/v1/admin/messages"); PrepareRequest(client_, request_, urlBuilder_); @@ -537,7 +427,7 @@ public virtual async System.Threading.Tasks.Task CreateTextToAudio var status_ = (int)response_.StatusCode; if (status_ == 201) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -595,7 +485,7 @@ public virtual async System.Threading.Tasks.Task CreateTextToAudio } /// - /// Get Text Audios Paginated Query + /// Get Chat Messages Paginated Query /// /// /// Sample request: @@ -608,14 +498,14 @@ public virtual async System.Threading.Tasks.Task CreateTextToAudio /// /// OK /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetTextAudioPaginatedQueryAsync(System.DateTimeOffset? startDate, System.DateTimeOffset? endDate, int? pageNumber, int? pageSize) + public virtual System.Threading.Tasks.Task GetChatMessagesPaginatedQueryAsync(System.DateTimeOffset? startDate, System.DateTimeOffset? endDate, int? pageNumber, int? pageSize) { - return GetTextAudioPaginatedQueryAsync(startDate, endDate, pageNumber, pageSize, System.Threading.CancellationToken.None); + return GetChatMessagesPaginatedQueryAsync(startDate, endDate, pageNumber, pageSize, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// - /// Get Text Audios Paginated Query + /// Get Chat Messages Paginated Query /// /// /// Sample request: @@ -628,7 +518,7 @@ public virtual System.Threading.Tasks.Task GetTextAud /// /// OK /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetTextAudioPaginatedQueryAsync(System.DateTimeOffset? startDate, System.DateTimeOffset? endDate, int? pageNumber, int? pageSize, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetChatMessagesPaginatedQueryAsync(System.DateTimeOffset? startDate, System.DateTimeOffset? endDate, int? pageNumber, int? pageSize, System.Threading.CancellationToken cancellationToken) { var client_ = _httpClient; var disposeClient_ = false; @@ -641,8 +531,8 @@ public virtual async System.Threading.Tasks.Task GetT var urlBuilder_ = new System.Text.StringBuilder(); if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); - // Operation Path: "api/v1/admin/audio/Paginated" - urlBuilder_.Append("api/v1/admin/audio/Paginated"); + // Operation Path: "api/v1/admin/messages/Paginated" + urlBuilder_.Append("api/v1/admin/messages/Paginated"); urlBuilder_.Append('?'); if (startDate != null) { @@ -687,7 +577,7 @@ public virtual async System.Threading.Tasks.Task GetT var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -735,7 +625,7 @@ public virtual async System.Threading.Tasks.Task GetT } /// - /// Get Chat Message + /// Get Chat Session with history /// /// /// Sample request: @@ -745,14 +635,14 @@ public virtual async System.Threading.Tasks.Task GetT /// /// OK /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetChatMessageQueryAsync(System.Guid id) + public virtual System.Threading.Tasks.Task GetChatSessionQueryAsync(System.Guid id) { - return GetChatMessageQueryAsync(id, System.Threading.CancellationToken.None); + return GetChatSessionQueryAsync(id, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// - /// Get Chat Message + /// Get Chat Session with history /// /// /// Sample request: @@ -762,7 +652,7 @@ public virtual System.Threading.Tasks.Task GetChatMessageQueryAs /// /// OK /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetChatMessageQueryAsync(System.Guid id, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetChatSessionQueryAsync(System.Guid id, System.Threading.CancellationToken cancellationToken) { if (id == null) throw new System.ArgumentNullException("id"); @@ -778,8 +668,8 @@ public virtual async System.Threading.Tasks.Task GetChatMessageQ var urlBuilder_ = new System.Text.StringBuilder(); if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); - // Operation Path: "api/v1/admin/messages/{id}" - urlBuilder_.Append("api/v1/admin/messages/"); + // Operation Path: "api/v1/admin/sessions/{id}" + urlBuilder_.Append("api/v1/admin/sessions/"); urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); PrepareRequest(client_, request_, urlBuilder_); @@ -807,7 +697,7 @@ public virtual async System.Threading.Tasks.Task GetChatMessageQ var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -865,50 +755,65 @@ public virtual async System.Threading.Tasks.Task GetChatMessageQ } /// - /// Get All Chat Messages for a session Query + /// Patch Chat Session Command /// /// /// Sample request: ///
- ///
"StartDate": "2024-06-01T00:00:00Z" - ///
"EndDate": "2024-12-01T00:00:00Z" - ///
"api-version": 1.0 + ///
HttpPatch Body + ///
{ + ///
"Id": "60fb5e99-3a78-43df-a512-7d8ff498499e", + ///
"Title": "Agent Framework Chat Session" + ///
} + ///
+ ///
"version": 1.0 ///
- /// OK + /// No Content /// A server side error occurred. - public virtual System.Threading.Tasks.Task> GetChatMessagesQueryAsync() + public virtual System.Threading.Tasks.Task PatchChatSessionCommandAsync(System.Guid id, PatchChatSessionCommand body) { - return GetChatMessagesQueryAsync(System.Threading.CancellationToken.None); + return PatchChatSessionCommandAsync(id, body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// - /// Get All Chat Messages for a session Query + /// Patch Chat Session Command /// /// /// Sample request: ///
- ///
"StartDate": "2024-06-01T00:00:00Z" - ///
"EndDate": "2024-12-01T00:00:00Z" - ///
"api-version": 1.0 + ///
HttpPatch Body + ///
{ + ///
"Id": "60fb5e99-3a78-43df-a512-7d8ff498499e", + ///
"Title": "Agent Framework Chat Session" + ///
} + ///
+ ///
"version": 1.0 ///
- /// OK + /// No Content /// A server side error occurred. - public virtual async System.Threading.Tasks.Task> GetChatMessagesQueryAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task PatchChatSessionCommandAsync(System.Guid id, PatchChatSessionCommand body, System.Threading.CancellationToken cancellationToken) { + if (id == null) + throw new System.ArgumentNullException("id"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = new System.Net.Http.HttpRequestMessage()) { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + var json_ = System.Text.Json.JsonSerializer.SerializeToUtf8Bytes(body, JsonSerializerSettings); + var content_ = new System.Net.Http.ByteArrayContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("PATCH"); var urlBuilder_ = new System.Text.StringBuilder(); if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); - // Operation Path: "api/v1/admin/messages" - urlBuilder_.Append("api/v1/admin/messages"); + // Operation Path: "api/v1/admin/sessions/{id}" + urlBuilder_.Append("api/v1/admin/sessions/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); PrepareRequest(client_, request_, urlBuilder_); @@ -933,14 +838,9 @@ public virtual async System.Threading.Tasks.Task GetChatMessageQ ProcessResponse(client_, response_); var status_ = (int)response_.StatusCode; - if (status_ == 200) + if (status_ == 204) { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; + return; } else if (status_ == 401) @@ -993,76 +893,51 @@ public virtual async System.Threading.Tasks.Task GetChatMessageQ } /// - /// Creates new Chat Message with initial message prompt/response history + /// Remove ChatSession Command /// /// - /// Types of Chat Completion are: - ///
1. Informational Prompt: A prompt requesting information - ///
- Example Prompt: "What's the capital of France?" - ///
- Example Response: "The capital of France is Paris." - ///
2. Multiple Choice Prompt: A prompt with instructions for multiple-choice responses. - ///
- Example Prompt: “Choose an activity for the weekend: a) Hiking b) Movie night c) Cooking class d) Board games” - ///
- Example Response: “I'd recommend hiking! It's a great way to enjoy nature and get some exercise.” - ///
Sample request: + /// Sample request: ///
- ///
HttpPost Body - ///
{ - ///
"Id": 00000000-0000-0000-0000-000000000000, - ///
"Message": "Hi, I am interested in learning about Agent Framework." - ///
} - ///
- ///
"version": 1.0 + ///
"Id": 60fb5e99-3a78-43df-a512-7d8ff498499e + ///
"api-version": 1.0 ///
- /// Created + /// No Content /// A server side error occurred. - public virtual System.Threading.Tasks.Task CreateChatMessageCommandAsync(CreateChatMessageCommand body) + public virtual System.Threading.Tasks.Task RemoveChatSessionCommandAsync(System.Guid id) { - return CreateChatMessageCommandAsync(body, System.Threading.CancellationToken.None); + return RemoveChatSessionCommandAsync(id, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// - /// Creates new Chat Message with initial message prompt/response history + /// Remove ChatSession Command /// /// - /// Types of Chat Completion are: - ///
1. Informational Prompt: A prompt requesting information - ///
- Example Prompt: "What's the capital of France?" - ///
- Example Response: "The capital of France is Paris." - ///
2. Multiple Choice Prompt: A prompt with instructions for multiple-choice responses. - ///
- Example Prompt: “Choose an activity for the weekend: a) Hiking b) Movie night c) Cooking class d) Board games” - ///
- Example Response: “I'd recommend hiking! It's a great way to enjoy nature and get some exercise.” - ///
Sample request: - ///
- ///
HttpPost Body - ///
{ - ///
"Id": 00000000-0000-0000-0000-000000000000, - ///
"Message": "Hi, I am interested in learning about Agent Framework." - ///
} + /// Sample request: ///
- ///
"version": 1.0 + ///
"Id": 60fb5e99-3a78-43df-a512-7d8ff498499e + ///
"api-version": 1.0 ///
- /// Created + /// No Content /// A server side error occurred. - public virtual async System.Threading.Tasks.Task CreateChatMessageCommandAsync(CreateChatMessageCommand body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task RemoveChatSessionCommandAsync(System.Guid id, System.Threading.CancellationToken cancellationToken) { + if (id == null) + throw new System.ArgumentNullException("id"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = new System.Net.Http.HttpRequestMessage()) { - var json_ = System.Text.Json.JsonSerializer.SerializeToUtf8Bytes(body, JsonSerializerSettings); - var content_ = new System.Net.Http.ByteArrayContent(json_); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + request_.Method = new System.Net.Http.HttpMethod("DELETE"); var urlBuilder_ = new System.Text.StringBuilder(); if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); - // Operation Path: "api/v1/admin/messages" - urlBuilder_.Append("api/v1/admin/messages"); + // Operation Path: "api/v1/admin/sessions/{id}" + urlBuilder_.Append("api/v1/admin/sessions/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); PrepareRequest(client_, request_, urlBuilder_); @@ -1087,34 +962,29 @@ public virtual async System.Threading.Tasks.Task CreateChatMessa ProcessResponse(client_, response_); var status_ = (int)response_.StatusCode; - if (status_ == 201) + if (status_ == 204) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; + return; } else - if (status_ == 400) + if (status_ == 401) { var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } - throw new ApiException("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else - if (status_ == 401) + if (status_ == 404) { var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } - throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else if (status_ == 500) @@ -1147,178 +1017,37 @@ public virtual async System.Threading.Tasks.Task CreateChatMessa } /// - /// Get Chat Messages Paginated Query + /// Get All Chat Sessions Query /// /// /// Sample request: ///
///
"StartDate": "2024-06-01T00:00:00Z" ///
"EndDate": "2024-12-01T00:00:00Z" - ///
"PageNumber": 1 - ///
"PageSize" : 10 ///
"api-version": 1.0 ///
/// OK /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetChatMessagesPaginatedQueryAsync(System.DateTimeOffset? startDate, System.DateTimeOffset? endDate, int? pageNumber, int? pageSize) + public virtual System.Threading.Tasks.Task> GetChatSessionsQueryAsync() { - return GetChatMessagesPaginatedQueryAsync(startDate, endDate, pageNumber, pageSize, System.Threading.CancellationToken.None); + return GetChatSessionsQueryAsync(System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// - /// Get Chat Messages Paginated Query + /// Get All Chat Sessions Query /// /// /// Sample request: ///
///
"StartDate": "2024-06-01T00:00:00Z" ///
"EndDate": "2024-12-01T00:00:00Z" - ///
"PageNumber": 1 - ///
"PageSize" : 10 ///
"api-version": 1.0 ///
/// OK /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetChatMessagesPaginatedQueryAsync(System.DateTimeOffset? startDate, System.DateTimeOffset? endDate, int? pageNumber, int? pageSize, System.Threading.CancellationToken cancellationToken) - { - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - var urlBuilder_ = new System.Text.StringBuilder(); - if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); - // Operation Path: "api/v1/admin/messages/Paginated" - urlBuilder_.Append("api/v1/admin/messages/Paginated"); - urlBuilder_.Append('?'); - if (startDate != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("StartDate")).Append('=').Append(System.Uri.EscapeDataString(startDate.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append('&'); - } - if (endDate != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("EndDate")).Append('=').Append(System.Uri.EscapeDataString(endDate.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append('&'); - } - if (pageNumber != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("PageNumber")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(pageNumber, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); - } - if (pageSize != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("PageSize")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(pageSize, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); - } - urlBuilder_.Length--; - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = new System.Collections.Generic.Dictionary>(); - foreach (var item_ in response_.Headers) - headers_[item_.Key] = item_.Value; - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 401) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); - throw new ApiException("Internal Server Error", status_, responseText_, headers_, null); - } - else - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// - /// Get Chat Session with history - /// - /// - /// Sample request: - ///
- ///
"Id": 60fb5e99-3a78-43df-a512-7d8ff498499e - ///
"api-version": 1.0 - ///
- /// OK - /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetChatSessionQueryAsync(System.Guid id) - { - return GetChatSessionQueryAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// - /// Get Chat Session with history - /// - /// - /// Sample request: - ///
- ///
"Id": 60fb5e99-3a78-43df-a512-7d8ff498499e - ///
"api-version": 1.0 - ///
- /// OK - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetChatSessionQueryAsync(System.Guid id, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task> GetChatSessionsQueryAsync(System.Threading.CancellationToken cancellationToken) { - if (id == null) - throw new System.ArgumentNullException("id"); - var client_ = _httpClient; var disposeClient_ = false; try @@ -1330,9 +1059,8 @@ public virtual async System.Threading.Tasks.Task GetChatSessionQ var urlBuilder_ = new System.Text.StringBuilder(); if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); - // Operation Path: "api/v1/admin/sessions/{id}" - urlBuilder_.Append("api/v1/admin/sessions/"); - urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + // Operation Path: "api/v1/admin/sessions" + urlBuilder_.Append("api/v1/admin/sessions"); PrepareRequest(client_, request_, urlBuilder_); @@ -1359,7 +1087,7 @@ public virtual async System.Threading.Tasks.Task GetChatSessionQ var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -1417,1772 +1145,58 @@ public virtual async System.Threading.Tasks.Task GetChatSessionQ } /// - /// Patch Chat Session Command + /// Creates new Chat Session with initial message prompt/response history /// /// - /// Sample request: + /// Types of Chat Completion are: + ///
1. Informational Prompt: A prompt requesting information + ///
- Example Prompt: "What's the capital of France?" + ///
- Example Response: "The capital of France is Paris." + ///
2. Multiple Choice Prompt: A prompt with instructions for multiple-choice responses. + ///
- Example Prompt: “Choose an activity for the weekend: a) Hiking b) Movie night c) Cooking class d) Board games” + ///
- Example Response: “I'd recommend hiking! It's a great way to enjoy nature and get some exercise.” + ///
Sample request: ///
- ///
HttpPatch Body + ///
HttpPost Body ///
{ - ///
"Id": "60fb5e99-3a78-43df-a512-7d8ff498499e", - ///
"Title": "Agent Framework Chat Session" + ///
"Id": 00000000-0000-0000-0000-000000000000, + ///
"Message": "Hi, I am interested in learning about Agent Framework." ///
} ///
///
"version": 1.0 ///
- /// No Content + /// Created /// A server side error occurred. - public virtual System.Threading.Tasks.Task PatchChatSessionCommandAsync(System.Guid id, PatchChatSessionCommand body) + public virtual System.Threading.Tasks.Task CreateChatSessionCommandAsync(CreateChatSessionCommand body) { - return PatchChatSessionCommandAsync(id, body, System.Threading.CancellationToken.None); + return CreateChatSessionCommandAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// - /// Patch Chat Session Command + /// Creates new Chat Session with initial message prompt/response history /// /// - /// Sample request: - ///
- ///
HttpPatch Body - ///
{ - ///
"Id": "60fb5e99-3a78-43df-a512-7d8ff498499e", - ///
"Title": "Agent Framework Chat Session" - ///
} - ///
- ///
"version": 1.0 - ///
- /// No Content - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task PatchChatSessionCommandAsync(System.Guid id, PatchChatSessionCommand body, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var json_ = System.Text.Json.JsonSerializer.SerializeToUtf8Bytes(body, JsonSerializerSettings); - var content_ = new System.Net.Http.ByteArrayContent(json_); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - - var urlBuilder_ = new System.Text.StringBuilder(); - if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); - // Operation Path: "api/v1/admin/sessions/{id}" - urlBuilder_.Append("api/v1/admin/sessions/"); - urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = new System.Collections.Generic.Dictionary>(); - foreach (var item_ in response_.Headers) - headers_[item_.Key] = item_.Value; - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 204) - { - return; - } - else - if (status_ == 401) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 404) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); - throw new ApiException("Internal Server Error", status_, responseText_, headers_, null); - } - else - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// - /// Remove ChatSession Command - /// - /// - /// Sample request: - ///
- ///
"Id": 60fb5e99-3a78-43df-a512-7d8ff498499e - ///
"api-version": 1.0 - ///
- /// No Content - /// A server side error occurred. - public virtual System.Threading.Tasks.Task RemoveChatSessionCommandAsync(System.Guid id) - { - return RemoveChatSessionCommandAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// - /// Remove ChatSession Command - /// - /// - /// Sample request: - ///
- ///
"Id": 60fb5e99-3a78-43df-a512-7d8ff498499e - ///
"api-version": 1.0 - ///
- /// No Content - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task RemoveChatSessionCommandAsync(System.Guid id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - - var urlBuilder_ = new System.Text.StringBuilder(); - if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); - // Operation Path: "api/v1/admin/sessions/{id}" - urlBuilder_.Append("api/v1/admin/sessions/"); - urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = new System.Collections.Generic.Dictionary>(); - foreach (var item_ in response_.Headers) - headers_[item_.Key] = item_.Value; - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 204) - { - return; - } - else - if (status_ == 401) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 404) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); - throw new ApiException("Internal Server Error", status_, responseText_, headers_, null); - } - else - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// - /// Get All Chat Sessions Query - /// - /// - /// Sample request: - ///
- ///
"StartDate": "2024-06-01T00:00:00Z" - ///
"EndDate": "2024-12-01T00:00:00Z" - ///
"api-version": 1.0 - ///
- /// OK - /// A server side error occurred. - public virtual System.Threading.Tasks.Task> GetChatSessionsQueryAsync() - { - return GetChatSessionsQueryAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// - /// Get All Chat Sessions Query - /// - /// - /// Sample request: - ///
- ///
"StartDate": "2024-06-01T00:00:00Z" - ///
"EndDate": "2024-12-01T00:00:00Z" - ///
"api-version": 1.0 - ///
- /// OK - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task> GetChatSessionsQueryAsync(System.Threading.CancellationToken cancellationToken) - { - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - var urlBuilder_ = new System.Text.StringBuilder(); - if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); - // Operation Path: "api/v1/admin/sessions" - urlBuilder_.Append("api/v1/admin/sessions"); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = new System.Collections.Generic.Dictionary>(); - foreach (var item_ in response_.Headers) - headers_[item_.Key] = item_.Value; - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 401) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 404) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); - throw new ApiException("Internal Server Error", status_, responseText_, headers_, null); - } - else - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// - /// Creates new Chat Session with initial message prompt/response history - /// - /// - /// Types of Chat Completion are: - ///
1. Informational Prompt: A prompt requesting information - ///
- Example Prompt: "What's the capital of France?" - ///
- Example Response: "The capital of France is Paris." - ///
2. Multiple Choice Prompt: A prompt with instructions for multiple-choice responses. - ///
- Example Prompt: “Choose an activity for the weekend: a) Hiking b) Movie night c) Cooking class d) Board games” - ///
- Example Response: “I'd recommend hiking! It's a great way to enjoy nature and get some exercise.” - ///
Sample request: - ///
- ///
HttpPost Body - ///
{ - ///
"Id": 00000000-0000-0000-0000-000000000000, - ///
"Message": "Hi, I am interested in learning about Agent Framework." - ///
} - ///
- ///
"version": 1.0 - ///
- /// Created - /// A server side error occurred. - public virtual System.Threading.Tasks.Task CreateChatSessionCommandAsync(CreateChatSessionCommand body) - { - return CreateChatSessionCommandAsync(body, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// - /// Creates new Chat Session with initial message prompt/response history - /// - /// - /// Types of Chat Completion are: - ///
1. Informational Prompt: A prompt requesting information - ///
- Example Prompt: "What's the capital of France?" - ///
- Example Response: "The capital of France is Paris." - ///
2. Multiple Choice Prompt: A prompt with instructions for multiple-choice responses. - ///
- Example Prompt: “Choose an activity for the weekend: a) Hiking b) Movie night c) Cooking class d) Board games” - ///
- Example Response: “I'd recommend hiking! It's a great way to enjoy nature and get some exercise.” - ///
Sample request: - ///
- ///
HttpPost Body - ///
{ - ///
"Id": 00000000-0000-0000-0000-000000000000, - ///
"Message": "Hi, I am interested in learning about Agent Framework." - ///
} - ///
- ///
"version": 1.0 - ///
- /// Created - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task CreateChatSessionCommandAsync(CreateChatSessionCommand body, System.Threading.CancellationToken cancellationToken) - { - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var json_ = System.Text.Json.JsonSerializer.SerializeToUtf8Bytes(body, JsonSerializerSettings); - var content_ = new System.Net.Http.ByteArrayContent(json_); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - var urlBuilder_ = new System.Text.StringBuilder(); - if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); - // Operation Path: "api/v1/admin/sessions" - urlBuilder_.Append("api/v1/admin/sessions"); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = new System.Collections.Generic.Dictionary>(); - foreach (var item_ in response_.Headers) - headers_[item_.Key] = item_.Value; - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 201) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 401) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); - throw new ApiException("Internal Server Error", status_, responseText_, headers_, null); - } - else - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// - /// Update ChatSession Command, typically with changing the title or adding a new message - /// - /// - /// Sample request: - ///
- ///
HttpPut Body - ///
{ - ///
"Id": "60fb5e99-3a78-43df-a512-7d8ff498499e", - ///
"Message": "Hi, I am interested in learning about Agent Framework.", - ///
"Content": "Certainly! Agent Framework is a great framework for AI.", - ///
} - ///
- ///
"version": 1.0 - ///
- /// No Content - /// A server side error occurred. - public virtual System.Threading.Tasks.Task UpdateChatSessionCommandAsync(UpdateChatSessionCommand body) - { - return UpdateChatSessionCommandAsync(body, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// - /// Update ChatSession Command, typically with changing the title or adding a new message - /// - /// - /// Sample request: - ///
- ///
HttpPut Body - ///
{ - ///
"Id": "60fb5e99-3a78-43df-a512-7d8ff498499e", - ///
"Message": "Hi, I am interested in learning about Agent Framework.", - ///
"Content": "Certainly! Agent Framework is a great framework for AI.", - ///
} - ///
- ///
"version": 1.0 - ///
- /// No Content - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task UpdateChatSessionCommandAsync(UpdateChatSessionCommand body, System.Threading.CancellationToken cancellationToken) - { - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var json_ = System.Text.Json.JsonSerializer.SerializeToUtf8Bytes(body, JsonSerializerSettings); - var content_ = new System.Net.Http.ByteArrayContent(json_); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - - var urlBuilder_ = new System.Text.StringBuilder(); - if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); - // Operation Path: "api/v1/admin/sessions" - urlBuilder_.Append("api/v1/admin/sessions"); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = new System.Collections.Generic.Dictionary>(); - foreach (var item_ in response_.Headers) - headers_[item_.Key] = item_.Value; - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 204) - { - return; - } - else - if (status_ == 401) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 404) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); - throw new ApiException("Internal Server Error", status_, responseText_, headers_, null); - } - else - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// - /// Get Chat Sessions Paginated Query - /// - /// - /// Sample request: - ///
- ///
"StartDate": "2024-06-01T00:00:00Z" - ///
"EndDate": "2024-12-01T00:00:00Z" - ///
"PageNumber": 1 - ///
"PageSize" : 10 - ///
"api-version": 1.0 - ///
- /// OK - /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetChatSessionsPaginatedQueryAsync(System.DateTimeOffset? startDate, System.DateTimeOffset? endDate, int? pageNumber, int? pageSize) - { - return GetChatSessionsPaginatedQueryAsync(startDate, endDate, pageNumber, pageSize, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// - /// Get Chat Sessions Paginated Query - /// - /// - /// Sample request: - ///
- ///
"StartDate": "2024-06-01T00:00:00Z" - ///
"EndDate": "2024-12-01T00:00:00Z" - ///
"PageNumber": 1 - ///
"PageSize" : 10 - ///
"api-version": 1.0 - ///
- /// OK - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetChatSessionsPaginatedQueryAsync(System.DateTimeOffset? startDate, System.DateTimeOffset? endDate, int? pageNumber, int? pageSize, System.Threading.CancellationToken cancellationToken) - { - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - var urlBuilder_ = new System.Text.StringBuilder(); - if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); - // Operation Path: "api/v1/admin/sessions/Paginated" - urlBuilder_.Append("api/v1/admin/sessions/Paginated"); - urlBuilder_.Append('?'); - if (startDate != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("StartDate")).Append('=').Append(System.Uri.EscapeDataString(startDate.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append('&'); - } - if (endDate != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("EndDate")).Append('=').Append(System.Uri.EscapeDataString(endDate.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append('&'); - } - if (pageNumber != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("PageNumber")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(pageNumber, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); - } - if (pageSize != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("PageSize")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(pageSize, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); - } - urlBuilder_.Length--; - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = new System.Collections.Generic.Dictionary>(); - foreach (var item_ in response_.Headers) - headers_[item_.Key] = item_.Value; - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 401) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); - throw new ApiException("Internal Server Error", status_, responseText_, headers_, null); - } - else - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// - /// Get Text Image with history - /// - /// - /// Sample request: - ///
- ///
"Id": 60fb5e99-3a78-43df-a512-7d8ff498499e - ///
"api-version": 1.0 - ///
- /// OK - /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetTextImageQueryAsync(System.Guid id) - { - return GetTextImageQueryAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// - /// Get Text Image with history - /// - /// - /// Sample request: - ///
- ///
"Id": 60fb5e99-3a78-43df-a512-7d8ff498499e - ///
"api-version": 1.0 - ///
- /// OK - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetTextImageQueryAsync(System.Guid id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - var urlBuilder_ = new System.Text.StringBuilder(); - if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); - // Operation Path: "api/v1/admin/images/{id}" - urlBuilder_.Append("api/v1/admin/images/"); - urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = new System.Collections.Generic.Dictionary>(); - foreach (var item_ in response_.Headers) - headers_[item_.Key] = item_.Value; - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 401) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 404) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); - throw new ApiException("Internal Server Error", status_, responseText_, headers_, null); - } - else - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// - /// Remove Image Command - /// - /// - /// Sample request: - ///
- ///
"Id": 60fb5e99-3a78-43df-a512-7d8ff498499e - ///
"api-version": 1.0 - ///
- /// No Content - /// A server side error occurred. - public virtual System.Threading.Tasks.Task RemoveTextImageCommandAsync(System.Guid id) - { - return RemoveTextImageCommandAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// - /// Remove Image Command - /// - /// - /// Sample request: - ///
- ///
"Id": 60fb5e99-3a78-43df-a512-7d8ff498499e - ///
"api-version": 1.0 - ///
- /// No Content - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task RemoveTextImageCommandAsync(System.Guid id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - - var urlBuilder_ = new System.Text.StringBuilder(); - if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); - // Operation Path: "api/v1/admin/images/{id}" - urlBuilder_.Append("api/v1/admin/images/"); - urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = new System.Collections.Generic.Dictionary>(); - foreach (var item_ in response_.Headers) - headers_[item_.Key] = item_.Value; - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 204) - { - return; - } - else - if (status_ == 401) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 404) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); - throw new ApiException("Internal Server Error", status_, responseText_, headers_, null); - } - else - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// - /// Get All Text Images Query - /// - /// - /// Sample request: - ///
- ///
"StartDate": "2024-06-01T00:00:00Z" - ///
"EndDate": "2024-12-01T00:00:00Z" - ///
"api-version": 1.0 - ///
- /// OK - /// A server side error occurred. - public virtual System.Threading.Tasks.Task> GetTextImagesQueryAsync() - { - return GetTextImagesQueryAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// - /// Get All Text Images Query - /// - /// - /// Sample request: - ///
- ///
"StartDate": "2024-06-01T00:00:00Z" - ///
"EndDate": "2024-12-01T00:00:00Z" - ///
"api-version": 1.0 - ///
- /// OK - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task> GetTextImagesQueryAsync(System.Threading.CancellationToken cancellationToken) - { - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - var urlBuilder_ = new System.Text.StringBuilder(); - if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); - // Operation Path: "api/v1/admin/images" - urlBuilder_.Append("api/v1/admin/images"); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = new System.Collections.Generic.Dictionary>(); - foreach (var item_ in response_.Headers) - headers_[item_.Key] = item_.Value; - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 401) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 404) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); - throw new ApiException("Internal Server Error", status_, responseText_, headers_, null); - } - else - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// - /// Creates new Image from Text - /// - /// - /// Sample request: - ///
- ///
HttpPost Body - ///
{ - ///
"Id": 00000000-0000-0000-0000-000000000000, - ///
"Message": "Hi, I am interested in learning about Agent Framework." - ///
} - ///
- ///
"version": 1.0 - ///
- /// Created - /// A server side error occurred. - public virtual System.Threading.Tasks.Task CreateTextToImageCommandAsync(CreateTextToImageCommand body) - { - return CreateTextToImageCommandAsync(body, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// - /// Creates new Image from Text - /// - /// - /// Sample request: - ///
- ///
HttpPost Body - ///
{ - ///
"Id": 00000000-0000-0000-0000-000000000000, - ///
"Message": "Hi, I am interested in learning about Agent Framework." - ///
} - ///
- ///
"version": 1.0 - ///
- /// Created - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task CreateTextToImageCommandAsync(CreateTextToImageCommand body, System.Threading.CancellationToken cancellationToken) - { - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var json_ = System.Text.Json.JsonSerializer.SerializeToUtf8Bytes(body, JsonSerializerSettings); - var content_ = new System.Net.Http.ByteArrayContent(json_); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - var urlBuilder_ = new System.Text.StringBuilder(); - if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); - // Operation Path: "api/v1/admin/images" - urlBuilder_.Append("api/v1/admin/images"); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = new System.Collections.Generic.Dictionary>(); - foreach (var item_ in response_.Headers) - headers_[item_.Key] = item_.Value; - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 201) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 401) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); - throw new ApiException("Internal Server Error", status_, responseText_, headers_, null); - } - else - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// - /// Get Text Images Paginated Query - /// - /// - /// Sample request: - ///
- ///
"StartDate": "2024-06-01T00:00:00Z" - ///
"EndDate": "2024-12-01T00:00:00Z" - ///
"PageNumber": 1 - ///
"PageSize" : 10 - ///
"api-version": 1.0 - ///
- /// OK - /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetTextImagesPaginatedQueryAsync(System.DateTimeOffset? startDate, System.DateTimeOffset? endDate, int? pageNumber, int? pageSize) - { - return GetTextImagesPaginatedQueryAsync(startDate, endDate, pageNumber, pageSize, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// - /// Get Text Images Paginated Query - /// - /// - /// Sample request: - ///
- ///
"StartDate": "2024-06-01T00:00:00Z" - ///
"EndDate": "2024-12-01T00:00:00Z" - ///
"PageNumber": 1 - ///
"PageSize" : 10 - ///
"api-version": 1.0 - ///
- /// OK - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetTextImagesPaginatedQueryAsync(System.DateTimeOffset? startDate, System.DateTimeOffset? endDate, int? pageNumber, int? pageSize, System.Threading.CancellationToken cancellationToken) - { - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - var urlBuilder_ = new System.Text.StringBuilder(); - if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); - // Operation Path: "api/v1/admin/images/Paginated" - urlBuilder_.Append("api/v1/admin/images/Paginated"); - urlBuilder_.Append('?'); - if (startDate != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("StartDate")).Append('=').Append(System.Uri.EscapeDataString(startDate.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append('&'); - } - if (endDate != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("EndDate")).Append('=').Append(System.Uri.EscapeDataString(endDate.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append('&'); - } - if (pageNumber != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("PageNumber")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(pageNumber, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); - } - if (pageSize != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("PageSize")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(pageSize, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); - } - urlBuilder_.Length--; - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = new System.Collections.Generic.Dictionary>(); - foreach (var item_ in response_.Headers) - headers_[item_.Key] = item_.Value; - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 401) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); - throw new ApiException("Internal Server Error", status_, responseText_, headers_, null); - } - else - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// - /// Get Text Generation session with history - /// - /// - /// Sample request: - ///
- ///
"Id": 60fb5e99-3a78-43df-a512-7d8ff498499e - ///
"api-version": 1.0 - ///
- /// OK - /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetTextPromptQueryAsync(System.Guid id) - { - return GetTextPromptQueryAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// - /// Get Text Generation session with history - /// - /// - /// Sample request: - ///
- ///
"Id": 60fb5e99-3a78-43df-a512-7d8ff498499e - ///
"api-version": 1.0 - ///
- /// OK - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetTextPromptQueryAsync(System.Guid id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - var urlBuilder_ = new System.Text.StringBuilder(); - if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); - // Operation Path: "api/v1/admin/text/{id}" - urlBuilder_.Append("api/v1/admin/text/"); - urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = new System.Collections.Generic.Dictionary>(); - foreach (var item_ in response_.Headers) - headers_[item_.Key] = item_.Value; - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 401) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 404) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); - throw new ApiException("Internal Server Error", status_, responseText_, headers_, null); - } - else - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// - /// Remove TextGeneration Command - /// - /// - /// Sample request: - ///
- ///
"Id": 60fb5e99-3a78-43df-a512-7d8ff498499e - ///
"api-version": 1.0 - ///
- /// No Content - /// A server side error occurred. - public virtual System.Threading.Tasks.Task RemoveTextPromptCommandAsync(System.Guid id) - { - return RemoveTextPromptCommandAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// - /// Remove TextGeneration Command - /// - /// - /// Sample request: - ///
- ///
"Id": 60fb5e99-3a78-43df-a512-7d8ff498499e - ///
"api-version": 1.0 - ///
- /// No Content - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task RemoveTextPromptCommandAsync(System.Guid id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - - var urlBuilder_ = new System.Text.StringBuilder(); - if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); - // Operation Path: "api/v1/admin/text/{id}" - urlBuilder_.Append("api/v1/admin/text/"); - urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = new System.Collections.Generic.Dictionary>(); - foreach (var item_ in response_.Headers) - headers_[item_.Key] = item_.Value; - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 204) - { - return; - } - else - if (status_ == 401) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 404) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); - throw new ApiException("Internal Server Error", status_, responseText_, headers_, null); - } - else - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// - /// Get All Text Generations Query - /// - /// - /// Sample request: - ///
- ///
"StartDate": "2024-06-01T00:00:00Z" - ///
"EndDate": "2024-12-01T00:00:00Z" - ///
"api-version": 1.0 - ///
- /// OK - /// A server side error occurred. - public virtual System.Threading.Tasks.Task> GetTextPromptsQueryAsync() - { - return GetTextPromptsQueryAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// - /// Get All Text Generations Query - /// - /// - /// Sample request: + /// Types of Chat Completion are: + ///
1. Informational Prompt: A prompt requesting information + ///
- Example Prompt: "What's the capital of France?" + ///
- Example Response: "The capital of France is Paris." + ///
2. Multiple Choice Prompt: A prompt with instructions for multiple-choice responses. + ///
- Example Prompt: “Choose an activity for the weekend: a) Hiking b) Movie night c) Cooking class d) Board games” + ///
- Example Response: “I'd recommend hiking! It's a great way to enjoy nature and get some exercise.” + ///
Sample request: ///
- ///
"StartDate": "2024-06-01T00:00:00Z" - ///
"EndDate": "2024-12-01T00:00:00Z" - ///
"api-version": 1.0 + ///
HttpPost Body + ///
{ + ///
"Id": 00000000-0000-0000-0000-000000000000, + ///
"Message": "Hi, I am interested in learning about Agent Framework." + ///
} + ///
+ ///
"version": 1.0 ///
- /// OK + /// Created /// A server side error occurred. - public virtual async System.Threading.Tasks.Task> GetTextPromptsQueryAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task CreateChatSessionCommandAsync(CreateChatSessionCommand body, System.Threading.CancellationToken cancellationToken) { var client_ = _httpClient; var disposeClient_ = false; @@ -3190,13 +1204,17 @@ public virtual async System.Threading.Tasks.Task RemoveTextPromptCommandAsync(Sy { using (var request_ = new System.Net.Http.HttpRequestMessage()) { - request_.Method = new System.Net.Http.HttpMethod("GET"); + var json_ = System.Text.Json.JsonSerializer.SerializeToUtf8Bytes(body, JsonSerializerSettings); + var content_ = new System.Net.Http.ByteArrayContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); var urlBuilder_ = new System.Text.StringBuilder(); if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); - // Operation Path: "api/v1/admin/text" - urlBuilder_.Append("api/v1/admin/text"); + // Operation Path: "api/v1/admin/sessions" + urlBuilder_.Append("api/v1/admin/sessions"); PrepareRequest(client_, request_, urlBuilder_); @@ -3221,9 +1239,9 @@ public virtual async System.Threading.Tasks.Task RemoveTextPromptCommandAsync(Sy ProcessResponse(client_, response_); var status_ = (int)response_.StatusCode; - if (status_ == 200) + if (status_ == 201) { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -3231,24 +1249,24 @@ public virtual async System.Threading.Tasks.Task RemoveTextPromptCommandAsync(Sy return objectResponse_.Object; } else - if (status_ == 401) + if (status_ == 400) { var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } - throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + throw new ApiException("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else - if (status_ == 404) + if (status_ == 401) { var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } - throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else if (status_ == 500) @@ -3281,76 +1299,46 @@ public virtual async System.Threading.Tasks.Task RemoveTextPromptCommandAsync(Sy } /// - /// Creates new Text Generation session + /// Update ChatSession Command, typically with changing the title or adding a new message /// /// - /// Types of Text Generation are: - ///
1. Generic Prompt: A broad or open-ended request for content. - ///
- Example Prompt: “Write a short story.” - ///
- Example Response: “Once upon a time, in a quaint village, there lived a curious cat named Whiskers…” - ///
2. Specific Prompt: A prompt with clear instructions or a specific topic. - ///
- Example Prompt: “Describe the process of photosynthesis.” - ///
- Example Response: “Photosynthesis is the process by which plants convert sunlight into energy, using chlorophyll in their leaves…” - ///
3. Visual Prompt: A prompt related to an image or visual content. - ///
- Example Prompt: “Describe this image: ‘A serene sunset over the ocean.’” - ///
- Example Response: “The sun dipped below the horizon, casting hues of orange and pink across the calm waters…” - ///
4. Role-Based Prompt: A prompt where you assume a specific role or context. - ///
- Example Prompt: “Act as a travel guide.Describe the beauty of the Swiss Alps.” - ///
- Example Response: “Welcome to the majestic Swiss Alps! Snow-capped peaks, pristine lakes, and charming villages await…” - ///
5. Output Format Specification: A prompt specifying the desired output format. - ///
- Example Prompt: “Summarize the key findings of the research paper.” - ///
- Example Response: “The paper discusses novel algorithms for optimizing neural network training, achieving faster convergence…” - ///
Sample request: + /// Sample request: ///
- ///
HttpPost Body + ///
HttpPut Body ///
{ - ///
"Id": 00000000-0000-0000-0000-000000000000, - ///
"Message": "Hi, I am interested in learning about Agent Framework." + ///
"Id": "60fb5e99-3a78-43df-a512-7d8ff498499e", + ///
"Message": "Hi, I am interested in learning about Agent Framework.", + ///
"Content": "Certainly! Agent Framework is a great framework for AI.", ///
} ///
///
"version": 1.0 ///
- /// Created + /// No Content /// A server side error occurred. - public virtual System.Threading.Tasks.Task CreateTextPromptCommandAsync(CreateTextPromptCommand body) + public virtual System.Threading.Tasks.Task UpdateChatSessionCommandAsync(UpdateChatSessionCommand body) { - return CreateTextPromptCommandAsync(body, System.Threading.CancellationToken.None); + return UpdateChatSessionCommandAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// - /// Creates new Text Generation session + /// Update ChatSession Command, typically with changing the title or adding a new message /// /// - /// Types of Text Generation are: - ///
1. Generic Prompt: A broad or open-ended request for content. - ///
- Example Prompt: “Write a short story.” - ///
- Example Response: “Once upon a time, in a quaint village, there lived a curious cat named Whiskers…” - ///
2. Specific Prompt: A prompt with clear instructions or a specific topic. - ///
- Example Prompt: “Describe the process of photosynthesis.” - ///
- Example Response: “Photosynthesis is the process by which plants convert sunlight into energy, using chlorophyll in their leaves…” - ///
3. Visual Prompt: A prompt related to an image or visual content. - ///
- Example Prompt: “Describe this image: ‘A serene sunset over the ocean.’” - ///
- Example Response: “The sun dipped below the horizon, casting hues of orange and pink across the calm waters…” - ///
4. Role-Based Prompt: A prompt where you assume a specific role or context. - ///
- Example Prompt: “Act as a travel guide.Describe the beauty of the Swiss Alps.” - ///
- Example Response: “Welcome to the majestic Swiss Alps! Snow-capped peaks, pristine lakes, and charming villages await…” - ///
5. Output Format Specification: A prompt specifying the desired output format. - ///
- Example Prompt: “Summarize the key findings of the research paper.” - ///
- Example Response: “The paper discusses novel algorithms for optimizing neural network training, achieving faster convergence…” - ///
Sample request: + /// Sample request: ///
- ///
HttpPost Body + ///
HttpPut Body ///
{ - ///
"Id": 00000000-0000-0000-0000-000000000000, - ///
"Message": "Hi, I am interested in learning about Agent Framework." + ///
"Id": "60fb5e99-3a78-43df-a512-7d8ff498499e", + ///
"Message": "Hi, I am interested in learning about Agent Framework.", + ///
"Content": "Certainly! Agent Framework is a great framework for AI.", ///
} ///
///
"version": 1.0 ///
- /// Created + /// No Content /// A server side error occurred. - public virtual async System.Threading.Tasks.Task CreateTextPromptCommandAsync(CreateTextPromptCommand body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task UpdateChatSessionCommandAsync(UpdateChatSessionCommand body, System.Threading.CancellationToken cancellationToken) { var client_ = _httpClient; var disposeClient_ = false; @@ -3362,13 +1350,12 @@ public virtual async System.Threading.Tasks.Task CreateTextPrompt var content_ = new System.Net.Http.ByteArrayContent(json_); content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + request_.Method = new System.Net.Http.HttpMethod("PUT"); var urlBuilder_ = new System.Text.StringBuilder(); if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); - // Operation Path: "api/v1/admin/text" - urlBuilder_.Append("api/v1/admin/text"); + // Operation Path: "api/v1/admin/sessions" + urlBuilder_.Append("api/v1/admin/sessions"); PrepareRequest(client_, request_, urlBuilder_); @@ -3393,34 +1380,29 @@ public virtual async System.Threading.Tasks.Task CreateTextPrompt ProcessResponse(client_, response_); var status_ = (int)response_.StatusCode; - if (status_ == 201) + if (status_ == 204) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; + return; } else - if (status_ == 400) + if (status_ == 401) { var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } - throw new ApiException("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else - if (status_ == 401) + if (status_ == 404) { var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } - throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else if (status_ == 500) @@ -3453,7 +1435,7 @@ public virtual async System.Threading.Tasks.Task CreateTextPrompt } /// - /// Get Text Generations Paginated Query + /// Get Chat Sessions Paginated Query /// /// /// Sample request: @@ -3466,14 +1448,14 @@ public virtual async System.Threading.Tasks.Task CreateTextPrompt /// /// OK /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetTextPromptsPaginatedQueryAsync(System.DateTimeOffset? startDate, System.DateTimeOffset? endDate, int? pageNumber, int? pageSize) + public virtual System.Threading.Tasks.Task GetChatSessionsPaginatedQueryAsync(System.DateTimeOffset? startDate, System.DateTimeOffset? endDate, int? pageNumber, int? pageSize) { - return GetTextPromptsPaginatedQueryAsync(startDate, endDate, pageNumber, pageSize, System.Threading.CancellationToken.None); + return GetChatSessionsPaginatedQueryAsync(startDate, endDate, pageNumber, pageSize, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// - /// Get Text Generations Paginated Query + /// Get Chat Sessions Paginated Query /// /// /// Sample request: @@ -3486,7 +1468,7 @@ public virtual System.Threading.Tasks.Task GetTextPr /// /// OK /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetTextPromptsPaginatedQueryAsync(System.DateTimeOffset? startDate, System.DateTimeOffset? endDate, int? pageNumber, int? pageSize, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetChatSessionsPaginatedQueryAsync(System.DateTimeOffset? startDate, System.DateTimeOffset? endDate, int? pageNumber, int? pageSize, System.Threading.CancellationToken cancellationToken) { var client_ = _httpClient; var disposeClient_ = false; @@ -3499,8 +1481,8 @@ public virtual async System.Threading.Tasks.Task Get var urlBuilder_ = new System.Text.StringBuilder(); if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); - // Operation Path: "api/v1/admin/text/Paginated" - urlBuilder_.Append("api/v1/admin/text/Paginated"); + // Operation Path: "api/v1/admin/sessions/Paginated" + urlBuilder_.Append("api/v1/admin/sessions/Paginated"); urlBuilder_.Append('?'); if (startDate != null) { @@ -3545,7 +1527,7 @@ public virtual async System.Threading.Tasks.Task Get var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -4447,33 +2429,6 @@ public partial class ActorDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class ByteReadOnlyMemory - { - - [System.Text.Json.Serialization.JsonPropertyName("Length")] - public int Length { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("IsEmpty")] - public bool IsEmpty { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("Span")] - public ByteReadOnlySpan Span { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class ByteReadOnlySpan - { - - [System.Text.Json.Serialization.JsonPropertyName("Length")] - public int Length { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("IsEmpty")] - public bool IsEmpty { get; set; } - - } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")] public partial class ChatMessageDto { @@ -4600,51 +2555,6 @@ public partial class CreateChatSessionCommand } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class CreateTextPromptCommand - { - - [System.Text.Json.Serialization.JsonPropertyName("Id")] - public System.Guid Id { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("Prompt")] - public string Prompt { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class CreateTextToAudioCommand - { - - [System.Text.Json.Serialization.JsonPropertyName("Id")] - public System.Guid Id { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("ActorId")] - public System.Guid ActorId { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("Prompt")] - public string Prompt { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class CreateTextToImageCommand - { - - [System.Text.Json.Serialization.JsonPropertyName("Id")] - public System.Guid Id { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("Prompt")] - public string Prompt { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("Width")] - public int Width { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("Height")] - public int Height { get; set; } - - } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")] public partial class IUserEntity { @@ -4667,17 +2577,14 @@ public partial class IUserEntity [System.Text.Json.Serialization.JsonPropertyName("Roles")] public System.Collections.Generic.ICollection Roles { get; set; } - [System.Text.Json.Serialization.JsonPropertyName("CanDefine")] - public bool CanDefine { get; set; } + [System.Text.Json.Serialization.JsonPropertyName("CanView")] + public bool CanView { get; set; } - [System.Text.Json.Serialization.JsonPropertyName("CanMonitor")] - public bool CanMonitor { get; set; } + [System.Text.Json.Serialization.JsonPropertyName("CanEdit")] + public bool CanEdit { get; set; } - [System.Text.Json.Serialization.JsonPropertyName("CanClassify")] - public bool CanClassify { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("CanMitigate")] - public bool CanMitigate { get; set; } + [System.Text.Json.Serialization.JsonPropertyName("CanDelete")] + public bool CanDelete { get; set; } } @@ -4744,150 +2651,6 @@ public partial class SaveMyActorCommand } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class TextAudioDto - { - - [System.Text.Json.Serialization.JsonPropertyName("Id")] - public System.Guid Id { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("ActorId")] - public System.Guid ActorId { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("Description")] - public string Description { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("AudioBytes")] - public ByteReadOnlyMemory AudioBytes { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("AudioUrl")] - public System.Uri AudioUrl { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("Timestamp")] - public System.DateTimeOffset Timestamp { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class TextAudioDtoPaginatedList - { - - [System.Text.Json.Serialization.JsonPropertyName("Items")] - public System.Collections.Generic.ICollection Items { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("PageNumber")] - public int PageNumber { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("TotalPages")] - public int TotalPages { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("TotalCount")] - public int TotalCount { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("HasPreviousPage")] - public bool HasPreviousPage { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("HasNextPage")] - public bool HasNextPage { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class TextImageDto - { - - [System.Text.Json.Serialization.JsonPropertyName("Id")] - public System.Guid Id { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("ActorId")] - public System.Guid ActorId { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("Description")] - public string Description { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("ImageBytes")] - public ByteReadOnlyMemory ImageBytes { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("ImageUrl")] - public System.Uri ImageUrl { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("Height")] - public int Height { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("Width")] - public int Width { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("Timestamp")] - public System.DateTimeOffset Timestamp { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class TextImageDtoPaginatedList - { - - [System.Text.Json.Serialization.JsonPropertyName("Items")] - public System.Collections.Generic.ICollection Items { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("PageNumber")] - public int PageNumber { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("TotalPages")] - public int TotalPages { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("TotalCount")] - public int TotalCount { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("HasPreviousPage")] - public bool HasPreviousPage { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("HasNextPage")] - public bool HasNextPage { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class TextPromptDto - { - - [System.Text.Json.Serialization.JsonPropertyName("Id")] - public System.Guid Id { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("ActorId")] - public System.Guid ActorId { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("Prompt")] - public string Prompt { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("Timestamp")] - public System.DateTimeOffset Timestamp { get; set; } - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class TextPromptDtoPaginatedList - { - - [System.Text.Json.Serialization.JsonPropertyName("Items")] - public System.Collections.Generic.ICollection Items { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("PageNumber")] - public int PageNumber { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("TotalPages")] - public int TotalPages { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("TotalCount")] - public int TotalCount { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("HasPreviousPage")] - public bool HasPreviousPage { get; set; } - - [System.Text.Json.Serialization.JsonPropertyName("HasNextPage")] - public bool HasNextPage { get; set; } - - } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))")] public partial class UpdateChatSessionCommand { diff --git a/src/Presentation.WebApi/Presentation.WebApi.csproj b/src/Presentation.WebApi/Presentation.WebApi.csproj index 02bdacc..612b847 100644 --- a/src/Presentation.WebApi/Presentation.WebApi.csproj +++ b/src/Presentation.WebApi/Presentation.WebApi.csproj @@ -29,7 +29,7 @@ - +