Skip to content

Commit

Permalink
return type of __call__ is str
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonalaird committed May 29, 2024
1 parent 0a7fceb commit a7968a9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions vision_agent/agent/vision_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,17 +273,16 @@ def __init__(
self.max_retries = 2
self.report_progress_callback = report_progress_callback

@no_type_check
def __call__(
self,
input: Union[List[Dict[str, str]], str],
media: Optional[Union[str, Path]] = None,
) -> Dict[str, Any]:
) -> str:
if isinstance(input, str):
input = [{"role": "user", "content": input}]
results = self.chat_with_workflow(input, media)
results.pop("working_memory")
return results
return results["code"] # type: ignore

def chat_with_workflow(
self,
Expand Down

0 comments on commit a7968a9

Please sign in to comment.