Agentic Framework Using Dependency Injection? #10354
Closed
lovedeepatsgit
started this conversation in
General
Replies: 1 comment
-
For agents, you can use keyed-services as demonstrated in the sample: https://github.com/microsoft/semantic-kernel/blob/main/dotnet/samples/GettingStartedWithAgents/Step06_DependencyInjection.cs For group-chat, I might consider defining a factory with one of the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have tried Simple Plugins and ChatCompletionServices Using DI, and I liked this approach, Do anyone have any idea how We can Agentic Framework Using DI, Like there is , Is there anything for multiagent group chat, because it involves Selection and termination Strategies also? Any Recommendations, any previous samples or work done are most welcome.
using Microsoft.Extensions.Configuration;
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.ChatCompletion;
using Microsoft.Extensions.DependencyInjection;
using DependencyInjectedKernel.DiPlugins;
using Microsoft.SemanticKernel.Connectors.AzureOpenAI;
using Microsoft.SemanticKernel.Connectors.OpenAI;
using Microsoft.Extensions.Logging;
public class Program
{
public static async Task Main(string[] args)
{
var configuration = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
.AddJsonFile($"appsettings.{Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT")}.json", optional: true)
.Build();
}
Beta Was this translation helpful? Give feedback.
All reactions