Views
No views yet
smolagents to strip </code artifacts that GLM models append to code blocks, causing SyntaxError at every agent step.</code</code</code>smolagents captures </code</code inside the extracted code, breaking execution.1from huggingface_hub import hf_hub_download
2exec(open(hf_hub_download("lifatsastain/smolagents-glm-fix", "glm_fix.py")).read())
3apply()CodeAgent:1from huggingface_hub import hf_hub_download
2exec(open(hf_hub_download("lifatsastain/smolagents-glm-fix", "glm_fix.py")).read())
3apply()
4
5from smolagents import CodeAgent, OpenAIServerModel
6agent = CodeAgent(model=OpenAIServerModel("glm-4.7-flash", ...), tools=[...])