Skip to content

Commit ec6b653

Browse files
authored
add reference_data to agent calls (#57)
add reference_data to agent calls'
1 parent 7d72439 commit ec6b653

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

vision_agent/agent/vision_agent.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,7 @@ def __call__(
445445
self,
446446
input: Union[List[Dict[str, str]], str],
447447
image: Optional[Union[str, Path]] = None,
448+
reference_data: Optional[Dict[str, str]] = None,
448449
visualize_output: Optional[bool] = False,
449450
) -> str:
450451
"""Invoke the vision agent.
@@ -459,7 +460,12 @@ def __call__(
459460
"""
460461
if isinstance(input, str):
461462
input = [{"role": "user", "content": input}]
462-
return self.chat(input, image=image, visualize_output=visualize_output)
463+
return self.chat(
464+
input,
465+
image=image,
466+
visualize_output=visualize_output,
467+
reference_data=reference_data,
468+
)
463469

464470
def log_progress(self, description: str) -> None:
465471
_LOGGER.info(description)
@@ -563,10 +569,14 @@ def chat(
563569
self,
564570
chat: List[Dict[str, str]],
565571
image: Optional[Union[str, Path]] = None,
572+
reference_data: Optional[Dict[str, str]] = None,
566573
visualize_output: Optional[bool] = False,
567574
) -> str:
568575
answer, _ = self.chat_with_workflow(
569-
chat, image=image, visualize_output=visualize_output
576+
chat,
577+
image=image,
578+
visualize_output=visualize_output,
579+
reference_data=reference_data,
570580
)
571581
return answer
572582

0 commit comments

Comments
 (0)