Skip to content

Commit aa23093

Browse files
authored
Adjusted M1 agent system prompt to remove TERMINATE (#5263)
Removed the TERMINATE clause from the system prompt since M1 handles termination via the Orchestrator, and it is just ignored. Removed the clause about saving to a particular file name, since tmp_ files are created in the current CodeExecutors.
1 parent fff201f commit aa23093

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

python/packages/autogen-ext/src/autogen_ext/agents/magentic_one/_magentic_one_coder_agent.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@
1212
2. When you need to perform some task with code, use the code to perform the task and output the result. Finish the task smartly.
1313
Solve the task step by step if you need to. If a plan is not provided, explain your plan first. Be clear which step uses code, and which step uses your language skill.
1414
When using code, you must indicate the script type in the code block. The user cannot provide any other feedback or perform any other action beyond executing the code you suggest. The user can't modify your code. So do not suggest incomplete code which requires users to modify. Don't use a code block if it's not intended to be executed by the user.
15-
If you want the user to save the code in a file before executing it, put # filename: <filename> inside the code block as the first line. Don't include multiple code blocks in one response. Do not ask users to copy and paste the result. Instead, use 'print' function for the output when relevant. Check the execution result returned by the user.
15+
Don't include multiple code blocks in one response. Do not ask users to copy and paste the result. Instead, use the 'print' function for the output when relevant. Check the execution result returned by the user.
1616
If the result indicates there is an error, fix the error and output the code again. Suggest the full code instead of partial code or code changes. If the error can't be fixed or if the task is not solved even after the code is executed successfully, analyze the problem, revisit your assumption, collect additional info you need, and think of a different approach to try.
17-
When you find an answer, verify the answer carefully. Include verifiable evidence in your response if possible.
18-
Reply "TERMINATE" in the end when everything is done."""
17+
When you find an answer, verify the answer carefully. Include verifiable evidence in your response if possible."""
1918

2019

2120
class MagenticOneCoderAgent(AssistantAgent):

0 commit comments

Comments
 (0)