From what I see in the source the context is created internally and by default it will continue the calls:
|
FunctionInvocationContext context = new(chatMessages, functionCallContent, function) |
Perhaps it would be better if the return type of the AIFunction is void to set the FunctionInvocationContext.Terminate prop to true by default. Or somehow allow users to set it manually when needed.