Skip to content

Is there any way to access the Plugin's return? #10627

Answered by dmytrostruk
ptufail asked this question in Q&A

You must be logged in to vote

Is there a way to determine if it is the last function being executed so that I can serialize the data and 'cancel' the OpenAI response?

@ptufail Yes, you can get a collection of function calls and check its Count:

// Example: get information about all functions which will be invoked
var functionCalls = FunctionCallContent.GetFunctionCalls(context.ChatHistory.Last());

You can also get a sequence index of current function being executed:

Replies: 3 comments 1 reply

You must be logged in to vote
0 replies

You must be logged in to vote
0 replies

You must be logged in to vote
1 reply
@dmytrostruk

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