Replies: 1 comment 1 reply
-
Update: Keyed Kernels Workaround - Works but Need Design Feedback The workaround solution works! Here's what we implemented: What We Did Instead of trying to select services within a single kernel, we created multiple dedicated kernels using keyed services: // Program.cs - Register dedicated kernels for each service
Results
Design Concerns & Questions While this approach works, I'm wondering about the design implications:
Alternative Patterns Considered
Would love to hear from the SK team: Is this keyed kernel approach considered a best practice, or should we expect better service selection support in future versions? Thanks for any guidance! |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
We're experimenting with the Semantic Kernel Agent Framework (v1.63.0) in a .NET 8 Web API application and encountering a service selection issue when multiple Azure OpenAI chat completion services are registered in the dependency
injection container.
Setup
Service Registration in Program.cs:
Agent Creation:
Problem
When invoking the agent, we consistently get:
Microsoft.SemanticKernel.KernelException: No service was found for any of the supported types: Microsoft.SemanticKernel.ChatCompletion.IChatCompletionService, Microsoft.Extensions.AI.IChatClient. Expected serviceIds: default.
What We've Tried
Questions
Looking at the ChatCompletionAgent source code, it uses GetChatCompletionService(kernel, arguments) which relies on the kernel's service selector, but it seems to fail despite our services being registered correctly.
Environment
Any guidance would be greatly appreciated! We're excited about the agent framework but stuck on this service selection issue.
Beta Was this translation helpful? Give feedback.
All reactions