Support Anthropic conversation logging and retries
Tests / Test apps.device-host-agent.tests.test_mcp_token.test_load_or_create_concurrent_calls_do_not_corrupt failed
Tests / Test apps.device-host-agent.tests.test_mcp_token.test_load_or_create_concurrent_calls_do_not_corrupt failed
This commit is contained in:
@@ -43,6 +43,12 @@ class AIPlanner(Planner):
|
||||
history_summary=_history_summary(world),
|
||||
device_platform=context.device_platform,
|
||||
)
|
||||
if context.step_results and not context.step_results[-1].success:
|
||||
user_prompt += (
|
||||
"\n\nThe previous tool call failed. Diagnose the failure and choose a "
|
||||
"corrected action or finish the task if it cannot proceed.\n"
|
||||
f"Previous failure: {context.step_results[-1].error or 'unknown error'}"
|
||||
)
|
||||
decision = self.client.decide(
|
||||
system_prompt=PLANNER_SYSTEM_PROMPT,
|
||||
user_prompt=user_prompt,
|
||||
|
||||
Reference in New Issue
Block a user