Replies: 3 comments 2 replies
-
Hi @tosokr, Thank you for your question! Yes, by default, Semantic Kernel limits the number of auto function invocation attempts to 5 times. This is to prevent models from getting in infinite loops. However, if you are confident about your functions (i.e. clear descriptions and low costs), you can increase the limit. You can do so by providing a custom from semantic_kernel.connectors.ai.function_choice_behavior import FunctionChoiceBehavior
agent = ChatCompletionAgent(
service=AzureChatCompletion(),
name="...",
instructions="...",
plugins=[...],
function_choice_behavior=FunctionChoiceBehavior.Auto(maximum_auto_invoke_attempts=25), # Custom FunctionChoiceBehavior
) Regarding to the hanging issue, is it possible for you to know where it hangs? And is it on the |
Beta Was this translation helpful? Give feedback.
-
Hi @TaoChenOSU Thanks for the provided answer. About the hanging issue, I am using ChatCompletionAgent. There is no error reported, so I don't know what the problem is. |
Beta Was this translation helpful? Give feedback.
-
Hi @tosokr, you could also give the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am using the Semantic Kernel Python 1.32.2 in combination with ChainLit 2.5.5 and the O4-mini model.
I am creating an agent (tried with both ChatCompletionAgent and AzureResponsesAgent) and attaching four plugins (two MCP servers, one open API, and one Azure Agent) to the kernel.
If I use agent.get_response(), it works, but the plugins are called a maximum of five times. With agent.invoke_stream(), it just hangs out after the fifth call.
Is there a limit to using the semantic kernel with reasoning models? Any idea what is wrong?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions