Skip to content

KernelFunctionTerminationStrategy is not working #11583

Answered by moonbox3
AyushAP8 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @AyushAP8, I've been looking at the code you've provided and I am not seeing anything terribly off. I'd be curious to know what is actually coming back for result.value[0] as part of result_parser=lambda result: TERMINATION_KEYWORD in str(result.value[0]).lower(),

Have you tried following the agent_collaboration.py sample more closely?

termination_keyword = "yes"

termination_function = KernelFunctionFromPrompt(
  function_name="termination",
  prompt=f"""
Examine the RESPONSE and determine whether the content has been deemed satisfactory.
If the content is satisfactory, respond with a single word without explanation: {termination_keyword}.
If specific suggestions are being provided, i…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

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

@moonbox3
Comment options

moonbox3 May 9, 2025
Collaborator

Answer selected by sophialagerkranspandey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
python Pull requests for the Python Semantic Kernel agents
3 participants