Open joslat opened 1 month ago
I made a comment too about unnecessary verbosity.
When I get the chatService from a kernel, why do I need to specify again the kernel when using it? IMHO it should use the kernel it is bound to (was generated from it) by default.
@joslat Our thinking is that the lifecycle of an AI service and a Kernel instance are typically different. E.g. I may instantiate an AI service to be used for the duration of my application whereas the Kernel instance may live for the duration of a request (with the AI service being injected into it).
We previously had the AI service and Kernel linked and this provided problematic because of the different lifecycles so we changed the behaviour. We find the current pattern works well when using DI.
We may need a Blog post for this, let me chat with the team. Thanks for the feedback.
Describe the bug When I get the chatService from a kernel, why do I need to specify again the kernel when using it? IMHO it should use the kernel it is bound to (was generated from it) by default.
To Reproduce Steps to reproduce the behavior: Create a new .net console app, add the following code:
Expected behavior I would like that it does use function calling properly, but it cannot.
For this to happen you have to specify the kernel when the ChatCompletionService is used, when it was created from that same kernel. It's like telling it every single time who his "father" is ;)
For this to work I should use:
Screenshots N/A
Platform Anywhere
Additional context Add any other context about the problem here.