KEMBAR78
fix: CodeExecutorAgent prompt misuse by Dormiveglia-elf · Pull Request #6559 · microsoft/autogen · GitHub
Skip to content

Conversation

@Dormiveglia-elf
Copy link
Contributor

Why are these changes needed?

Summary of Change:
The instruction regarding code block format ("Python code should be provided in python code blocks, and sh shell scripts should be provided in sh code blocks for execution") will be moved from DEFAULT_AGENT_DESCRIPTION to DEFAULT_SYSTEM_MESSAGE.

Problem Solved:
Ensure that the model_client receives the correct instructions for generating properly formatted code blocks. Previously, the instruction was only included in the agent's description and not passed to the model_client, leading to potential issues in code generation. By moving it to DEFAULT_SYSTEM_MESSAGE, the model_client will now accurately format code blocks, improving the reliability of code generation.

Related issue number

Closes #6558

Checks

@jackgerrits jackgerrits enabled auto-merge (squash) May 19, 2025 20:25
@jackgerrits jackgerrits merged commit 8c5dcab into microsoft:main May 19, 2025
63 checks passed
@codecov
Copy link

codecov bot commented May 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.52%. Comparing base (fffa61f) to head (63c827d).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6559      +/-   ##
==========================================
+ Coverage   75.40%   79.52%   +4.11%     
==========================================
  Files         331      225     -106     
  Lines       19779    16661    -3118     
  Branches      406        0     -406     
==========================================
- Hits        14914    13249    -1665     
+ Misses       4592     3412    -1180     
+ Partials      273        0     -273     
Flag Coverage Δ
unittests 79.52% <100.00%> (+4.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CodeExecutorAgent Prompt Misuse

2 participants