zeerafle commited on
Commit
818d867
·
1 Parent(s): af5aa56

Rename async method param from query to task in code_execution.py

Browse files
tools/code_execution.py CHANGED
@@ -47,9 +47,9 @@ class CodeExecutionTool(BaseTool):
47
  except Exception as e:
48
  return f"Error performing code execution: {str(e)}"
49
 
50
- async def _arun(self, query: str, run_manager: Optional[CallbackManagerForToolRun]=None) -> str:
51
  """Run the code execution tool asynchronously."""
52
- return self._run(query, run_manager=run_manager.get_sync())
53
 
54
  # Example usage
55
  if __name__ == "__main__":
 
47
  except Exception as e:
48
  return f"Error performing code execution: {str(e)}"
49
 
50
+ async def _arun(self, task: str, run_manager: Optional[CallbackManagerForToolRun]=None) -> str:
51
  """Run the code execution tool asynchronously."""
52
+ return self._run(task, run_manager=run_manager.get_sync())
53
 
54
  # Example usage
55
  if __name__ == "__main__":
tools/youtube_understanding.py CHANGED
@@ -29,9 +29,7 @@ class YoutubeUnderstandingTool(BaseTool):
29
  model=self.model_id,
30
  contents=Content(
31
  parts=[
32
- Part(
33
- file_data=FileData(file_uri=video_url)
34
- ),
35
  Part(text=task)
36
  ]
37
  )
 
29
  model=self.model_id,
30
  contents=Content(
31
  parts=[
32
+ Part(file_data=FileData(file_uri=video_url)),
 
 
33
  Part(text=task)
34
  ]
35
  )