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

Dotnet: Add modelServiceId support to SemanticKernelAgent #5422

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

cedricmendelin
Copy link

@cedricmendelin cedricmendelin commented Feb 7, 2025

The SemanticKernelAgent class has been updated to include an optional modelServiceId parameter, allowing the specification of a service ID for the model.

Why are these changes needed?

Currently, SemanticKernelAgent uses the parameterless method for resolving IChatCompletionSerivce. This will fail, when multiple models are registered in the Kernel.

To support different models registered in the Kernel, I adopted the resolving of the IChatCompletionSerivce within the SemanticKernelAgent with an optional parameter. When it is not set, I resolve the default instance, otherwise, I use the optional parameter as a servide id for resolving the IChatCompletionSerivce service.

Related issue number

Checks

cedricmendelin and others added 2 commits February 7, 2025 11:12
The `SemanticKernelAgent` class has been updated to include an optional `modelServiceId` parameter, allowing the specification of a service ID for the model.
@rysweet
Copy link
Collaborator

rysweet commented Feb 17, 2025

@lokitoth I don't know if ou ported this into agent chat or not but if you did you may want to take this up.

Copy link

codecov bot commented Feb 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.74%. Comparing base (2a90731) to head (dc5dc9e).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5422   +/-   ##
=======================================
  Coverage   78.74%   78.74%           
=======================================
  Files         167      167           
  Lines       10025    10025           
=======================================
  Hits         7894     7894           
  Misses       2131     2131           
Flag Coverage Δ
unittests 78.74% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants