Rename tool_response_message to error_message and append it (#325)

This commit is contained in:
Albert Villanova del Moral 2025-01-23 12:45:58 +01:00 committed by GitHub
parent bc82d1cb76
commit 115c8aef1e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -294,10 +294,11 @@ class MultiStepAgent:
+ str(step_log.error)
+ "\nNow let's retry: take care not to repeat previous errors! If you have retried several times, try a completely different approach.\n"
)
tool_response_message = {
error_message = {
"role": MessageRole.ASSISTANT,
"content": message_content,
}
memory.append(error_message)
if step_log.tool_calls is not None and (
step_log.error is not None or step_log.observations is not None
):