Calling native function in IChatCompletionService #7001
-
I'm trying to develop an agent which write and send an email for me based on this link I want to integrate semantic kernel in my asp.net razor page. It's a chat page which will support the user with writing and sending email. I have injected my plugin with native function and this is the result of DebugPlugins function. ****** Registered plugins and functions ****** Plugin: EmailPlugin So, on the UI side, everything is going well until the last step (6: Send the email to the boss). I'm sorry, but I don't actually have the capability to send emails. However, you can easily copy the draft below and send it through your email client. I spend a lot of time to find related sample, but all of existing samples in repo are based on console app or notebooks. In real world scenario we need web app integration as well as console app. Code: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Try changing this: await foreach (var item in _aiChatService.GetStreamingChatMessageContentsAsync(aiHistory, executionSettings: executionSettings)) to this: await foreach (var item in _aiChatService.GetStreamingChatMessageContentsAsync(aiHistory, executionSettings: executionSettings, _kernel)) The kernel object is what contains the plugins. Those need to be provided to the service. |
Beta Was this translation helpful? Give feedback.
Try changing this:
to this:
The kernel object is what contains the plugins. Those need to be provided to the service.