Skip to content

Conversation

toadlyBroodle
Copy link

  • What: Updated extract_code_from_text in src/smolagents/utils.py to remove any occurrences of triple backticks from within extracted code blocks.
  • Why: Prevents persistent code block parsing errors caused by stray ``` inside model outputs.
  • How: Cleans each matched code block via match.replace("```", "").strip() before joining.
  • Scope: Limited to code extraction logic; no API or behavior changes outside parsing.
  • Impact/Risk: Low; only affects handling of malformed code blocks.

…code blocks and update prompt rules to enforce strict formatting for code blocks.
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.

1 participant