Skip to content

Commit

Permalink
fix mypy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
shankar-vision-eng committed May 29, 2024
1 parent b770584 commit ad1bc52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion vision_agent/agent/agent_coder.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def parse_file_name(s: str) -> str:
return "".join([p for p in s.split(" ") if p.endswith(".png")])


def write_program(question: str, feedback: str, model: LLM, image=None) -> str:
def write_program(question: str, feedback: str, model: LLM, image: Optional[Union[str, Path]]=None) -> str:
prompt = PROGRAM.format(
docstring=TOOL_DOCSTRING, question=question, feedback=feedback
)
Expand Down
2 changes: 1 addition & 1 deletion vision_agent/agent/vision_agent_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def chat_with_workflow(

while not success and retries < self.max_retries:
plan_i = write_plan(
chat, TOOL_DESCRIPTIONS, format_memory(working_memory), self.planner, images=[image]
chat, TOOL_DESCRIPTIONS, format_memory(working_memory), self.planner, images=[image] if image else None
)
plan_i_str = "\n-".join([e["instructions"] for e in plan_i])
if self.verbosity >= 1:
Expand Down

0 comments on commit ad1bc52

Please sign in to comment.