autogen/dotnet/samples/AgentChat/AutoGen.Basic.Sample
cedricmendelin b37c192424
Dotnet: Add modelServiceId support to SemanticKernelAgent (#5422)
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

- [x] I've included any doc changes needed for
https://microsoft.github.io/autogen/. See
https://microsoft.github.io/autogen/docs/Contribute#documentation to
build and test documentation locally.
- [x] I've added tests (if relevant) corresponding to the changes
introduced in this PR.
- [x] I've made sure all auto checks have passed.

---------

Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
Co-authored-by: Xiaoyun Zhang <bigmiao.zhang@gmail.com>
2025-02-25 20:39:45 +00:00
..
CodeSnippet fix: Various fixes and cleanups to dotnet autogen core (#5242) 2025-01-28 17:13:36 -05:00
GettingStart fix: Various fixes and cleanups to dotnet autogen core (#5242) 2025-01-28 17:13:36 -05:00
AutoGen.Basic.Sample.csproj fix: Various fixes and cleanups to dotnet autogen core (#5242) 2025-01-28 17:13:36 -05:00
Example01_AssistantAgent.cs fix: Various fixes and cleanups to dotnet autogen core (#5242) 2025-01-28 17:13:36 -05:00
Example02_TwoAgent_MathChat.cs fix: Various fixes and cleanups to dotnet autogen core (#5242) 2025-01-28 17:13:36 -05:00
Example03_Agent_FunctionCall.cs fix: Various fixes and cleanups to dotnet autogen core (#5242) 2025-01-28 17:13:36 -05:00
Example04_Dynamic_GroupChat_Coding_Task.cs fix: Various fixes and cleanups to dotnet autogen core (#5242) 2025-01-28 17:13:36 -05:00
Example05_Dalle_And_GPT4V.cs fix: Various fixes and cleanups to dotnet autogen core (#5242) 2025-01-28 17:13:36 -05:00
Example06_UserProxyAgent.cs fix: Various fixes and cleanups to dotnet autogen core (#5242) 2025-01-28 17:13:36 -05:00
Example07_Dynamic_GroupChat_Calculate_Fibonacci.cs fix: Various fixes and cleanups to dotnet autogen core (#5242) 2025-01-28 17:13:36 -05:00
Example08_LMStudio.cs fix: Various fixes and cleanups to dotnet autogen core (#5242) 2025-01-28 17:13:36 -05:00
Example10_SemanticKernel.cs Dotnet: Add modelServiceId support to SemanticKernelAgent (#5422) 2025-02-25 20:39:45 +00:00
Example11_Sequential_GroupChat_Example.cs fix: Various fixes and cleanups to dotnet autogen core (#5242) 2025-01-28 17:13:36 -05:00
Example12_TwoAgent_Fill_Application.cs fix: Various fixes and cleanups to dotnet autogen core (#5242) 2025-01-28 17:13:36 -05:00
Example13_OpenAIAgent_JsonMode.cs fix: Various fixes and cleanups to dotnet autogen core (#5242) 2025-01-28 17:13:36 -05:00
Example14_MistralClientAgent_TokenCount.cs fix: Various fixes and cleanups to dotnet autogen core (#5242) 2025-01-28 17:13:36 -05:00
Example15_GPT4V_BinaryDataImageMessage.cs fix: Various fixes and cleanups to dotnet autogen core (#5242) 2025-01-28 17:13:36 -05:00
Example16_OpenAIChatAgent_ConnectToThirdPartyBackend.cs fix: Various fixes and cleanups to dotnet autogen core (#5242) 2025-01-28 17:13:36 -05:00
Example17_ReActAgent.cs fix: Various fixes and cleanups to dotnet autogen core (#5242) 2025-01-28 17:13:36 -05:00
GlobalUsing.cs fix: Various fixes and cleanups to dotnet autogen core (#5242) 2025-01-28 17:13:36 -05:00
LLMConfiguration.cs fix: Various fixes and cleanups to dotnet autogen core (#5242) 2025-01-28 17:13:36 -05:00
Program.cs fix: Various fixes and cleanups to dotnet autogen core (#5242) 2025-01-28 17:13:36 -05:00