Skip to content

Commit

Permalink
remove verbosity arg
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonalaird committed Oct 16, 2024
1 parent 9ab9e1d commit 0247de1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions vision_agent/tools/meta_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
CURRENT_LINE = 0
DEFAULT_WINDOW_SIZE = 100
ZMQ_PORT = os.environ.get("ZMQ_PORT", None)
VERBOSITY = os.environ.get("VERBOSITY", 0)


def report_progress_callback(port: int, inp: Dict[str, Any]) -> None:
Expand Down Expand Up @@ -443,14 +442,16 @@ def detect_dogs(image_path: str):
dogs = owl_v2("dog", image)
return dogs
"""
# verbosity is set to 0 to avoid adding extra content to the VisionAgent conversation
if ZMQ_PORT is not None:
agent = va.agent.VisionAgentCoder(
report_progress_callback=lambda inp: report_progress_callback(
int(ZMQ_PORT), inp
)
),
verbosity=0,
)
else:
agent = va.agent.VisionAgentCoder(verbosity=int(VERBOSITY))
agent = va.agent.VisionAgentCoder(verbosity=0)

fixed_chat: List[Message] = [{"role": "user", "content": chat, "media": media}]
response = agent.generate_code(
Expand Down Expand Up @@ -514,7 +515,8 @@ def detect_dogs(image_path: str):
return dogs
"""

agent = va.agent.VisionAgentCoder(verbosity=int(VERBOSITY))
# verbosity is set to 0 to avoid adding extra content to the VisionAgent conversation
agent = va.agent.VisionAgentCoder(verbosity=0)
if name not in artifacts:
print(f"[Artifact {name} does not exist]")
return f"[Artifact {name} does not exist]"
Expand Down

0 comments on commit 0247de1

Please sign in to comment.