Skip to content

Commit

Permalink
Merge branch 'main' into ma/use-default-policy
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeAlhayek authored Feb 13, 2025
2 parents ed0c5d3 + 6fbb1c6 commit b0de7f2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using CrestApps.OrchardCore.AI.Core;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Routing;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using CrestApps.OrchardCore.AI.Core;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Routing;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using CrestApps.OrchardCore.AI.Core;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Routing;
Expand Down
6 changes: 3 additions & 3 deletions src/Modules/CrestApps.OrchardCore.AI/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using OrchardCore;
using OrchardCore.ContentManagement;
using OrchardCore.ContentManagement.Display.ContentDisplay;
using OrchardCore.Data;
Expand Down Expand Up @@ -141,17 +142,16 @@ public override void ConfigureServices(IServiceCollection services)
services.AddCors(options =>
{
// There policies are intentionally left blank to allow consumers to configure these routes if needed.

options.AddPolicy(AIConstants.AiCompletionUtilityPolicyName, policy => { });

options.AddPolicy(AIConstants.AiCompletionChatPolicyName, policy => { });

options.AddPolicy(AIConstants.AiChatSessionPolicyName, policy => { });
});
}

public override void Configure(IApplicationBuilder app, IEndpointRouteBuilder routes, IServiceProvider serviceProvider)
{
app.UseCors();

routes
.AddApiAIChatSessionEndpoint()
.AddApiAIUtilityCompletionEndpoint<ApiChatStartup>()
Expand Down

0 comments on commit b0de7f2

Please sign in to comment.