Skip to content

Commit

Permalink
add some extra parsing for code snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonalaird committed May 13, 2024
1 parent 3bfab15 commit 6e09b1f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vision_agent/agent/vision_agent_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ def extract_code(code: str) -> str:
if "```python" in code:
code = code[code.find("```python") + len("```python") :]
code = code[: code.find("```")]
if code.startswith("python\n"):
code = code[len("python\n") :]
return code


Expand Down

0 comments on commit 6e09b1f

Please sign in to comment.