11# Memory & Previous Actions
22
3- ## Previous Action Status
4- {% if last_error_call_msg %}
5- **Your last response was invalid**: {{ last_error_call_msg }}
6- Please ensure your next response includes a proper tool call with valid function name and JSON arguments.
7- {% endif %}
8-
9- {% if last_failed_call_msg %}
10- **Your last tool call failed**: {{ last_failed_call_msg }}
11- The tool call was formatted correctly but execution failed. Please try a different approach or adjust your parameters.
12- {% endif %}
13-
143{% if responses %}
154## Recent Decision History
16- {% for response in responses [-5:] -%}
5+
6+ Here is a list of your recent decisions (from the most recent to the oldest):
7+ {% set response_count = responses |length %}
8+ {% set max_responses = 10 if response_count > 10 else response_count %}
9+ {% for i in range (max_responses ) -%}
10+ {% - set response = responses [-(max_responses - i )] -%}
1711{% - if response .choices and response .choices [0].message .tool_calls -%}
1812{% - set tool_call = response .choices [0].message .tool_calls [0] -%}
19- **{{ loop.index }}.** {{ tool_call.function }}
13+ **{{ i + 1 }}.** {{ tool_call.function }}
2014{% endif -%}
2115{% endfor %}
2216{% endif %}
@@ -35,3 +29,13 @@ This is the beginning of the game. Focus on:
3529- Building a foundation for scaling in later rounds
3630- Considering the overall arc of your run strategy
3731{% endif %}
32+
33+ {% if last_error_call_msg %}
34+ **NOTE**: **Your last response was invalid**: {{ last_error_call_msg }}
35+ Please ensure your next response includes a proper tool call with valid function name and JSON arguments.
36+ {% endif %}
37+
38+ {% if last_failed_call_msg %}
39+ **NOTE**: **Your last tool call failed**: {{ last_failed_call_msg }}
40+ The tool call was formatted correctly but execution failed. Please try a different approach or adjust your parameters.
41+ {% endif %}
0 commit comments