diff --git a/vision_agent/tools/tool_utils.py b/vision_agent/tools/tool_utils.py index 98ab5bf9..534bc078 100644 --- a/vision_agent/tools/tool_utils.py +++ b/vision_agent/tools/tool_utils.py @@ -28,7 +28,7 @@ class ToolCallTrace(BaseModel): request: MutableMapping[str, Any] response: MutableMapping[str, Any] error: Optional[Error] - files: Optional[List[Dict[str, str]]] + files: Optional[List[tuple[str, str]]] def send_inference_request( @@ -206,12 +206,7 @@ def _call_post( ) -> Any: files_in_b64 = None if files: - files_in_b64 = [ - {"video": b64encode(file[1]).decode("utf-8")} - if file[0] == "video" - else {"image": b64encode(file[0]).decode("utf-8")} - for file in files - ] + files_in_b64 = [(file[0], b64encode(file[1]).decode("utf-8")) for file in files] try: tool_call_trace = ToolCallTrace( endpoint_url=url,