Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin samples using DI #9769

Open
2 tasks
markwallace-microsoft opened this issue Nov 20, 2024 · 1 comment
Open
2 tasks

Plugin samples using DI #9769

markwallace-microsoft opened this issue Nov 20, 2024 · 1 comment
Assignees
Labels
samples sk team issue A tag to denote issues that where created by the Semantic Kernel team (i.e., not the community)

Comments

@markwallace-microsoft
Copy link
Member

  • Native function
  • Open API function
@markwallace-microsoft markwallace-microsoft moved this to Sprint: In Progress in Semantic Kernel Nov 20, 2024
@markwallace-microsoft markwallace-microsoft self-assigned this Nov 20, 2024
@markwallace-microsoft markwallace-microsoft added triage sk team issue A tag to denote issues that where created by the Semantic Kernel team (i.e., not the community) samples and removed triage labels Nov 20, 2024
@RogerBarreto
Copy link
Member

  • Native functions

We do have a sample in the getting started Step (Dependency Injection), injecting ILoggerFactory in a plugin.

public class TimeInformation(ILoggerFactory loggerFactory)

HomeAutomation Demo also uses DI with plugins, injecting plugins within plugins.

builder.Services.AddSingleton<MyTimePlugin>();

and here

public class MyAlarmPlugin(MyTimePlugin timePlugin)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
samples sk team issue A tag to denote issues that where created by the Semantic Kernel team (i.e., not the community)
Projects
Status: Sprint: In Progress
Development

No branches or pull requests

2 participants