mirror of
https://github.com/temporal-community/temporal-ai-agent.git
synced 2026-03-15 14:08:08 +01:00
Try to fix multiple ListAgents steps
This commit is contained in:
@@ -187,7 +187,7 @@ def generate_pick_new_goal_guidance()-> str:
|
|||||||
str: A prompt string prompting the LLM to when to go to pick-new-goal
|
str: A prompt string prompting the LLM to when to go to pick-new-goal
|
||||||
"""
|
"""
|
||||||
if is_multi_goal_mode():
|
if is_multi_goal_mode():
|
||||||
return 'Next should only be "pick-new-goal" if all tools have been run (use the system prompt to figure that out) or the user explicitly requested to pick a new goal.'
|
return 'Next should only be "pick-new-goal" if all tools have been run (use the system prompt to figure that out) or the user explicitly requested to pick a new goal. If next is "pick-new-goal" the tool should always be "ListAgents"'
|
||||||
else:
|
else:
|
||||||
return 'Next should never be "pick-new-goal".'
|
return 'Next should never be "pick-new-goal".'
|
||||||
|
|
||||||
|
|||||||
@@ -362,8 +362,8 @@ goal_ecomm_order_status = AgentGoal(
|
|||||||
example_conversation_history="\n ".join(
|
example_conversation_history="\n ".join(
|
||||||
[
|
[
|
||||||
"user: I'd like to know the status of my order",
|
"user: I'd like to know the status of my order",
|
||||||
"agent: Sure! I can help you out with that. May I have your email address or order number?",
|
"agent: Sure! I can help you out with that. May I have your order number?",
|
||||||
"user: email is bob.johnson@emailzzz.com ",
|
"user: 102 ",
|
||||||
"user_confirmed_tool_run: <user clicks confirm on GetOrderStatus tool>",
|
"user_confirmed_tool_run: <user clicks confirm on GetOrderStatus tool>",
|
||||||
"tool_result: { 'id': '102', 'summary': 'Red Sunglasses', 'email': 'matt.murdock@nelsonmurdock.com', 'status': 'shipped', 'order_date': '2025-04-01', 'last_order_update': '2025-04-06', 'tracking_id': '039813852990618' }",
|
"tool_result: { 'id': '102', 'summary': 'Red Sunglasses', 'email': 'matt.murdock@nelsonmurdock.com', 'status': 'shipped', 'order_date': '2025-04-01', 'last_order_update': '2025-04-06', 'tracking_id': '039813852990618' }",
|
||||||
"agent: Your order 'Red Sunglasses,' placed April 1, 2025, was shipped on April 6, 2025. Would you like to see the tracking inforation?",
|
"agent: Your order 'Red Sunglasses,' placed April 1, 2025, was shipped on April 6, 2025. Would you like to see the tracking inforation?",
|
||||||
|
|||||||
@@ -178,6 +178,7 @@ class AgentGoalWorkflow:
|
|||||||
current_tool = tool_data["tool"] = "ListAgents"
|
current_tool = tool_data["tool"] = "ListAgents"
|
||||||
waiting_for_confirm = True
|
waiting_for_confirm = True
|
||||||
self.confirmed = True
|
self.confirmed = True
|
||||||
|
continue
|
||||||
|
|
||||||
# else if the next step is to be done with the conversation such as if the user requests it via asking to "end conversation"
|
# else if the next step is to be done with the conversation such as if the user requests it via asking to "end conversation"
|
||||||
elif next_step == "done":
|
elif next_step == "done":
|
||||||
|
|||||||
Reference in New Issue
Block a user