Skip to content

Commit

Permalink
allow debugger to see docs in case the bug was a missing import
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonalaird committed Sep 9, 2024
1 parent 88b3529 commit f6b75bd
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions vision_agent/agent/vision_agent_coder_prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,11 @@
def remove_arrays(o):
if isinstance(o, list):
return [remove_arrays(i) for i in o]
return [remove_arrays(e) for e in o]
elif isinstance(o, dict):
for k, v in o.items():
o[k] = remove_arrays(v)
return {{k: remove_arrays(v) for k, v in o.items()}}
elif isinstance(o, np.ndarray):
return str(o.shape)
return "array: " + str(o.shape)
else:
return o
Expand Down Expand Up @@ -324,6 +323,11 @@ def find_text(image_path: str, text: str) -> str:
FIX_BUG = """
**Role** As a coder, your job is to find the error in the code and fix it. You are running in a notebook setting so you can run !pip install to install missing packages.
**Documentation**:
This is the documentation for the functions you have access to. You may call any of these functions to help you complete the task. They are available through importing `from vision_agent.tools import *`.
{docstring}
**Instructions**:
Please re-complete the code to fix the error message. Here is the previous version:
```python
Expand Down

0 comments on commit f6b75bd

Please sign in to comment.