Skip to content

Returning output from a native function #5986

Answered by dmytrostruk
vicperdana asked this question in Q&A
Discussion options

You must be logged in to vote

@vicperdana In this case, we do not provide function result, because streaming chunks are returning independently from function calling functionality. So, there are a couple of ways how to get each function result:

  1. Instead of using Kernel, you can use IChatCompletionService (you can get it from kernel.GetRequiredService<IChatCompletionService>()) and execute streaming with GetStreamingChatMessageContentsAsync method. This method accepts ChatHistory object, and this object will be updated with each function result.
  2. We are going to introduce filters for automatic function calling. Filters will allow you to intercept each function call, check function name, arguments, metadata and after fun…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@vicperdana
Comment options

@dmytrostruk
Comment options

Answer selected by vicperdana
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants