diff --git a/templates/csharp/custom-copilot-assistant-assistants-api/AdapterWithErrorHandler.cs.tpl b/templates/csharp/custom-copilot-assistant-assistants-api/AdapterWithErrorHandler.cs.tpl index 8d9aceb592..6456467fef 100644 --- a/templates/csharp/custom-copilot-assistant-assistants-api/AdapterWithErrorHandler.cs.tpl +++ b/templates/csharp/custom-copilot-assistant-assistants-api/AdapterWithErrorHandler.cs.tpl @@ -1,13 +1,14 @@ -using Microsoft.Bot.Builder.TraceExtensions; +using Microsoft.Bot.Builder.Integration.AspNet.Core; +using Microsoft.Bot.Builder.TraceExtensions; +using Microsoft.Bot.Connector.Authentication; using Microsoft.Bot.Schema; -using Microsoft.Teams.AI; namespace {{SafeProjectName}} { - public class AdapterWithErrorHandler : TeamsAdapter + public class AdapterWithErrorHandler : CloudAdapter { - public AdapterWithErrorHandler(IConfiguration auth, ILogger logger) - : base(auth, null, logger) + public AdapterWithErrorHandler(BotFrameworkAuthentication auth, ILogger logger) + : base(auth, logger) { OnTurnError = async (turnContext, exception) => { diff --git a/templates/csharp/custom-copilot-assistant-assistants-api/Controllers/BotController.cs.tpl b/templates/csharp/custom-copilot-assistant-assistants-api/Controllers/BotController.cs.tpl index d64474b006..3a737fffc7 100644 --- a/templates/csharp/custom-copilot-assistant-assistants-api/Controllers/BotController.cs.tpl +++ b/templates/csharp/custom-copilot-assistant-assistants-api/Controllers/BotController.cs.tpl @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Bot.Builder; -using Microsoft.Teams.AI; +using Microsoft.Bot.Builder.Integration.AspNet.Core; namespace {{SafeProjectName}}.Controllers { @@ -8,10 +8,10 @@ namespace {{SafeProjectName}}.Controllers [ApiController] public class BotController : ControllerBase { - private readonly TeamsAdapter Adapter; + private readonly CloudAdapter Adapter; private readonly IBot Bot; - public BotController(TeamsAdapter adapter, IBot bot) + public BotController(CloudAdapter adapter, IBot bot) { Adapter = adapter; Bot = bot; diff --git a/templates/csharp/custom-copilot-assistant-assistants-api/Program.cs.tpl b/templates/csharp/custom-copilot-assistant-assistants-api/Program.cs.tpl index bfee97297a..d81f9b4e5a 100644 --- a/templates/csharp/custom-copilot-assistant-assistants-api/Program.cs.tpl +++ b/templates/csharp/custom-copilot-assistant-assistants-api/Program.cs.tpl @@ -25,9 +25,9 @@ builder.Services.AddSingleton(); -builder.Services.AddSingleton(sp => sp.GetService()); -builder.Services.AddSingleton(sp => sp.GetService()); +builder.Services.AddSingleton(); +builder.Services.AddSingleton(sp => sp.GetService()); +builder.Services.AddSingleton(sp => sp.GetService()); builder.Services.AddSingleton(); {{#useOpenAI}} diff --git a/templates/csharp/custom-copilot-assistant-new/AdapterWithErrorHandler.cs.tpl b/templates/csharp/custom-copilot-assistant-new/AdapterWithErrorHandler.cs.tpl index 8d9aceb592..6456467fef 100644 --- a/templates/csharp/custom-copilot-assistant-new/AdapterWithErrorHandler.cs.tpl +++ b/templates/csharp/custom-copilot-assistant-new/AdapterWithErrorHandler.cs.tpl @@ -1,13 +1,14 @@ -using Microsoft.Bot.Builder.TraceExtensions; +using Microsoft.Bot.Builder.Integration.AspNet.Core; +using Microsoft.Bot.Builder.TraceExtensions; +using Microsoft.Bot.Connector.Authentication; using Microsoft.Bot.Schema; -using Microsoft.Teams.AI; namespace {{SafeProjectName}} { - public class AdapterWithErrorHandler : TeamsAdapter + public class AdapterWithErrorHandler : CloudAdapter { - public AdapterWithErrorHandler(IConfiguration auth, ILogger logger) - : base(auth, null, logger) + public AdapterWithErrorHandler(BotFrameworkAuthentication auth, ILogger logger) + : base(auth, logger) { OnTurnError = async (turnContext, exception) => { diff --git a/templates/csharp/custom-copilot-assistant-new/Controllers/BotController.cs.tpl b/templates/csharp/custom-copilot-assistant-new/Controllers/BotController.cs.tpl index d64474b006..3a737fffc7 100644 --- a/templates/csharp/custom-copilot-assistant-new/Controllers/BotController.cs.tpl +++ b/templates/csharp/custom-copilot-assistant-new/Controllers/BotController.cs.tpl @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Bot.Builder; -using Microsoft.Teams.AI; +using Microsoft.Bot.Builder.Integration.AspNet.Core; namespace {{SafeProjectName}}.Controllers { @@ -8,10 +8,10 @@ namespace {{SafeProjectName}}.Controllers [ApiController] public class BotController : ControllerBase { - private readonly TeamsAdapter Adapter; + private readonly CloudAdapter Adapter; private readonly IBot Bot; - public BotController(TeamsAdapter adapter, IBot bot) + public BotController(CloudAdapter adapter, IBot bot) { Adapter = adapter; Bot = bot; diff --git a/templates/csharp/custom-copilot-assistant-new/Program.cs.tpl b/templates/csharp/custom-copilot-assistant-new/Program.cs.tpl index 7e4b6263dc..c227326b87 100644 --- a/templates/csharp/custom-copilot-assistant-new/Program.cs.tpl +++ b/templates/csharp/custom-copilot-assistant-new/Program.cs.tpl @@ -27,9 +27,9 @@ builder.Services.AddSingleton(); -builder.Services.AddSingleton(sp => sp.GetService()); -builder.Services.AddSingleton(sp => sp.GetService()); +builder.Services.AddSingleton(); +builder.Services.AddSingleton(sp => sp.GetService()); +builder.Services.AddSingleton(sp => sp.GetService()); builder.Services.AddSingleton(); diff --git a/templates/csharp/custom-copilot-basic/AdapterWithErrorHandler.cs.tpl b/templates/csharp/custom-copilot-basic/AdapterWithErrorHandler.cs.tpl index 8d9aceb592..6456467fef 100644 --- a/templates/csharp/custom-copilot-basic/AdapterWithErrorHandler.cs.tpl +++ b/templates/csharp/custom-copilot-basic/AdapterWithErrorHandler.cs.tpl @@ -1,13 +1,14 @@ -using Microsoft.Bot.Builder.TraceExtensions; +using Microsoft.Bot.Builder.Integration.AspNet.Core; +using Microsoft.Bot.Builder.TraceExtensions; +using Microsoft.Bot.Connector.Authentication; using Microsoft.Bot.Schema; -using Microsoft.Teams.AI; namespace {{SafeProjectName}} { - public class AdapterWithErrorHandler : TeamsAdapter + public class AdapterWithErrorHandler : CloudAdapter { - public AdapterWithErrorHandler(IConfiguration auth, ILogger logger) - : base(auth, null, logger) + public AdapterWithErrorHandler(BotFrameworkAuthentication auth, ILogger logger) + : base(auth, logger) { OnTurnError = async (turnContext, exception) => { diff --git a/templates/csharp/custom-copilot-basic/Controllers/BotController.cs.tpl b/templates/csharp/custom-copilot-basic/Controllers/BotController.cs.tpl index d64474b006..3a737fffc7 100644 --- a/templates/csharp/custom-copilot-basic/Controllers/BotController.cs.tpl +++ b/templates/csharp/custom-copilot-basic/Controllers/BotController.cs.tpl @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Bot.Builder; -using Microsoft.Teams.AI; +using Microsoft.Bot.Builder.Integration.AspNet.Core; namespace {{SafeProjectName}}.Controllers { @@ -8,10 +8,10 @@ namespace {{SafeProjectName}}.Controllers [ApiController] public class BotController : ControllerBase { - private readonly TeamsAdapter Adapter; + private readonly CloudAdapter Adapter; private readonly IBot Bot; - public BotController(TeamsAdapter adapter, IBot bot) + public BotController(CloudAdapter adapter, IBot bot) { Adapter = adapter; Bot = bot; diff --git a/templates/csharp/custom-copilot-basic/Program.cs.tpl b/templates/csharp/custom-copilot-basic/Program.cs.tpl index 6e59b52a18..f063175448 100644 --- a/templates/csharp/custom-copilot-basic/Program.cs.tpl +++ b/templates/csharp/custom-copilot-basic/Program.cs.tpl @@ -27,9 +27,9 @@ builder.Services.AddSingleton(); -builder.Services.AddSingleton(sp => sp.GetService()); -builder.Services.AddSingleton(sp => sp.GetService()); +builder.Services.AddSingleton(); +builder.Services.AddSingleton(sp => sp.GetService()); +builder.Services.AddSingleton(sp => sp.GetService()); builder.Services.AddSingleton(); diff --git a/templates/csharp/custom-copilot-rag-azure-ai-search/AdapterWithErrorHandler.cs.tpl b/templates/csharp/custom-copilot-rag-azure-ai-search/AdapterWithErrorHandler.cs.tpl index 8d9aceb592..6456467fef 100644 --- a/templates/csharp/custom-copilot-rag-azure-ai-search/AdapterWithErrorHandler.cs.tpl +++ b/templates/csharp/custom-copilot-rag-azure-ai-search/AdapterWithErrorHandler.cs.tpl @@ -1,13 +1,14 @@ -using Microsoft.Bot.Builder.TraceExtensions; +using Microsoft.Bot.Builder.Integration.AspNet.Core; +using Microsoft.Bot.Builder.TraceExtensions; +using Microsoft.Bot.Connector.Authentication; using Microsoft.Bot.Schema; -using Microsoft.Teams.AI; namespace {{SafeProjectName}} { - public class AdapterWithErrorHandler : TeamsAdapter + public class AdapterWithErrorHandler : CloudAdapter { - public AdapterWithErrorHandler(IConfiguration auth, ILogger logger) - : base(auth, null, logger) + public AdapterWithErrorHandler(BotFrameworkAuthentication auth, ILogger logger) + : base(auth, logger) { OnTurnError = async (turnContext, exception) => { diff --git a/templates/csharp/custom-copilot-rag-azure-ai-search/Controllers/BotController.cs.tpl b/templates/csharp/custom-copilot-rag-azure-ai-search/Controllers/BotController.cs.tpl index d64474b006..3a737fffc7 100644 --- a/templates/csharp/custom-copilot-rag-azure-ai-search/Controllers/BotController.cs.tpl +++ b/templates/csharp/custom-copilot-rag-azure-ai-search/Controllers/BotController.cs.tpl @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Bot.Builder; -using Microsoft.Teams.AI; +using Microsoft.Bot.Builder.Integration.AspNet.Core; namespace {{SafeProjectName}}.Controllers { @@ -8,10 +8,10 @@ namespace {{SafeProjectName}}.Controllers [ApiController] public class BotController : ControllerBase { - private readonly TeamsAdapter Adapter; + private readonly CloudAdapter Adapter; private readonly IBot Bot; - public BotController(TeamsAdapter adapter, IBot bot) + public BotController(CloudAdapter adapter, IBot bot) { Adapter = adapter; Bot = bot; diff --git a/templates/csharp/custom-copilot-rag-azure-ai-search/Program.cs.tpl b/templates/csharp/custom-copilot-rag-azure-ai-search/Program.cs.tpl index 3f7ca4fe25..28dedbb168 100644 --- a/templates/csharp/custom-copilot-rag-azure-ai-search/Program.cs.tpl +++ b/templates/csharp/custom-copilot-rag-azure-ai-search/Program.cs.tpl @@ -27,9 +27,9 @@ builder.Services.AddSingleton(); -builder.Services.AddSingleton(sp => sp.GetService()); -builder.Services.AddSingleton(sp => sp.GetService()); +builder.Services.AddSingleton(); +builder.Services.AddSingleton(sp => sp.GetService()); +builder.Services.AddSingleton(sp => sp.GetService()); builder.Services.AddSingleton(); diff --git a/templates/csharp/custom-copilot-rag-custom-api/AdapterWithErrorHandler.cs.tpl b/templates/csharp/custom-copilot-rag-custom-api/AdapterWithErrorHandler.cs.tpl index 8d9aceb592..6456467fef 100644 --- a/templates/csharp/custom-copilot-rag-custom-api/AdapterWithErrorHandler.cs.tpl +++ b/templates/csharp/custom-copilot-rag-custom-api/AdapterWithErrorHandler.cs.tpl @@ -1,13 +1,14 @@ -using Microsoft.Bot.Builder.TraceExtensions; +using Microsoft.Bot.Builder.Integration.AspNet.Core; +using Microsoft.Bot.Builder.TraceExtensions; +using Microsoft.Bot.Connector.Authentication; using Microsoft.Bot.Schema; -using Microsoft.Teams.AI; namespace {{SafeProjectName}} { - public class AdapterWithErrorHandler : TeamsAdapter + public class AdapterWithErrorHandler : CloudAdapter { - public AdapterWithErrorHandler(IConfiguration auth, ILogger logger) - : base(auth, null, logger) + public AdapterWithErrorHandler(BotFrameworkAuthentication auth, ILogger logger) + : base(auth, logger) { OnTurnError = async (turnContext, exception) => { diff --git a/templates/csharp/custom-copilot-rag-custom-api/Controllers/BotController.cs.tpl b/templates/csharp/custom-copilot-rag-custom-api/Controllers/BotController.cs.tpl index d64474b006..3a737fffc7 100644 --- a/templates/csharp/custom-copilot-rag-custom-api/Controllers/BotController.cs.tpl +++ b/templates/csharp/custom-copilot-rag-custom-api/Controllers/BotController.cs.tpl @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Bot.Builder; -using Microsoft.Teams.AI; +using Microsoft.Bot.Builder.Integration.AspNet.Core; namespace {{SafeProjectName}}.Controllers { @@ -8,10 +8,10 @@ namespace {{SafeProjectName}}.Controllers [ApiController] public class BotController : ControllerBase { - private readonly TeamsAdapter Adapter; + private readonly CloudAdapter Adapter; private readonly IBot Bot; - public BotController(TeamsAdapter adapter, IBot bot) + public BotController(CloudAdapter adapter, IBot bot) { Adapter = adapter; Bot = bot; diff --git a/templates/csharp/custom-copilot-rag-custom-api/Program.cs.tpl b/templates/csharp/custom-copilot-rag-custom-api/Program.cs.tpl index f4bdbf08ee..92d1e94a20 100644 --- a/templates/csharp/custom-copilot-rag-custom-api/Program.cs.tpl +++ b/templates/csharp/custom-copilot-rag-custom-api/Program.cs.tpl @@ -28,9 +28,9 @@ builder.Services.AddSingleton(); -builder.Services.AddSingleton(sp => sp.GetService()); -builder.Services.AddSingleton(sp => sp.GetService()); +builder.Services.AddSingleton(); +builder.Services.AddSingleton(sp => sp.GetService()); +builder.Services.AddSingleton(sp => sp.GetService()); builder.Services.AddSingleton(); diff --git a/templates/csharp/custom-copilot-rag-customize/AdapterWithErrorHandler.cs.tpl b/templates/csharp/custom-copilot-rag-customize/AdapterWithErrorHandler.cs.tpl index 8d9aceb592..6456467fef 100644 --- a/templates/csharp/custom-copilot-rag-customize/AdapterWithErrorHandler.cs.tpl +++ b/templates/csharp/custom-copilot-rag-customize/AdapterWithErrorHandler.cs.tpl @@ -1,13 +1,14 @@ -using Microsoft.Bot.Builder.TraceExtensions; +using Microsoft.Bot.Builder.Integration.AspNet.Core; +using Microsoft.Bot.Builder.TraceExtensions; +using Microsoft.Bot.Connector.Authentication; using Microsoft.Bot.Schema; -using Microsoft.Teams.AI; namespace {{SafeProjectName}} { - public class AdapterWithErrorHandler : TeamsAdapter + public class AdapterWithErrorHandler : CloudAdapter { - public AdapterWithErrorHandler(IConfiguration auth, ILogger logger) - : base(auth, null, logger) + public AdapterWithErrorHandler(BotFrameworkAuthentication auth, ILogger logger) + : base(auth, logger) { OnTurnError = async (turnContext, exception) => { diff --git a/templates/csharp/custom-copilot-rag-customize/Controllers/BotController.cs.tpl b/templates/csharp/custom-copilot-rag-customize/Controllers/BotController.cs.tpl index d64474b006..3a737fffc7 100644 --- a/templates/csharp/custom-copilot-rag-customize/Controllers/BotController.cs.tpl +++ b/templates/csharp/custom-copilot-rag-customize/Controllers/BotController.cs.tpl @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Bot.Builder; -using Microsoft.Teams.AI; +using Microsoft.Bot.Builder.Integration.AspNet.Core; namespace {{SafeProjectName}}.Controllers { @@ -8,10 +8,10 @@ namespace {{SafeProjectName}}.Controllers [ApiController] public class BotController : ControllerBase { - private readonly TeamsAdapter Adapter; + private readonly CloudAdapter Adapter; private readonly IBot Bot; - public BotController(TeamsAdapter adapter, IBot bot) + public BotController(CloudAdapter adapter, IBot bot) { Adapter = adapter; Bot = bot; diff --git a/templates/csharp/custom-copilot-rag-customize/Program.cs.tpl b/templates/csharp/custom-copilot-rag-customize/Program.cs.tpl index fcb7ad4c78..d44d271bba 100644 --- a/templates/csharp/custom-copilot-rag-customize/Program.cs.tpl +++ b/templates/csharp/custom-copilot-rag-customize/Program.cs.tpl @@ -27,9 +27,9 @@ builder.Services.AddSingleton(); -builder.Services.AddSingleton(sp => sp.GetService()); -builder.Services.AddSingleton(sp => sp.GetService()); +builder.Services.AddSingleton(); +builder.Services.AddSingleton(sp => sp.GetService()); +builder.Services.AddSingleton(sp => sp.GetService()); builder.Services.AddSingleton();