-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Feature: FunctionChoiceBehavior.Required Answer Generation #7432
Comments
Ok looks like something is wrong on my site, when testing it, sorry for the confusion. I've stored the settings in an object and then they were overwritten by SK with the So the first time i get an answer and the second time i got only function calls. |
it will only give me a function call back, but never the generated Answer based on the Function Call from the Model. I encountered the same issue. How did you handle it afterward? |
@yanshinian so if you have the You can find the coresponding parameters for the function here : https://github.com/microsoft/semantic-kernel/blob/main/python/semantic_kernel/kernel.py These Functions will either give you a To call the Model again you can either use |
Using the invoke method of ChatCompletionAgent is fine, but I have issues when using invoke_stream. |
I debugged the code. When the value of maximum_auto_invoke_attempts corresponding to FunctionChoiceBehavior.Required() is 1, I used invoke_stream to execute. After the function call, the invoke loop stops, so no LLM invoke occurs. The reason the invoke works fine is because of the following code:
|
When FunctionChoiceBehavior.Required() is set, I call ChatCompletionAgent->invoke_stream and then call it again. This meets my needs. Or do you have any other good suggestions? There are too few examples online. |
Feature for
FunctionChoiceBehavior.Required()
i was trying out
FunctionChoiceBehavior.Required()
in a Project.But it is only returning the FunctionCall Content for me.
I noticed that since the
maximum_auto_invoke_attempts
is set to1
, it will only give me a function call back, but never the generated Answer based on the Function Call from the Model. I am not sure if theelse
after thefor loop
is working for me, maybe i am doing something wrong.I guess it's intended behavior, because we cannot make sure it's generating an answer in the second run ?
But probably it would be nice if we could add an option for to iterate a second time with
FunctionChoiceBehavior.Required
without tools in the Body to ensure a model answer fromFunctionChoiceBehavior.Required()
. Or maybe the option just that the developer can set themaximum_auto_invoke_attempts
.Please let me know what you think, if this could be helpful.
The text was updated successfully, but these errors were encountered: