Skip to content

Extract python code blocks first, and then general code blocks - #20

Open
radinshayanfar wants to merge 2 commits into
mainfrom
feat/code-extraction
Open

radinshayanfar wants to merge 2 commits into
mainfrom
feat/code-extraction

Conversation

@radinshayanfar

Copy link
Copy Markdown

This PR will modify the code_extract function of LCB. Instead of looking for triple backticks without language specification and picking the last code block, this PR will first look for python code blocks and use the last found one. If nothing is found, it then looks for code blocks without language specification pattern.

This fixes an issue where the model provides some more details, reasonings, or examples inside triple backticks after generating the soultion.

@radinshayanfar radinshayanfar changed the title utils: look for python code blocks, and then general code blocks Extract python code blocks first, and then general code blocks Dec 15, 2025
@radinshayanfar radinshayanfar self-assigned this Dec 15, 2025
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