Alexandre Gazola commited on
Commit
c67ac9f
·
1 Parent(s): 0203a60
count_max_bird_species_tool.py CHANGED
@@ -4,7 +4,7 @@ from ultralytics import YOLO
4
  from langchain_core.tools import tool
5
  from utils import decode_base64_to_frame
6
 
7
- @tool
8
  def count_max_bird_species_in_video(youtube_url: str) -> int:
9
  """
10
  Count the maximum number of bird species to be on camera simultaneously in a YouTube video.
 
4
  from langchain_core.tools import tool
5
  from utils import decode_base64_to_frame
6
 
7
+ @tool(return_direct=True)
8
  def count_max_bird_species_in_video(youtube_url: str) -> int:
9
  """
10
  Count the maximum number of bird species to be on camera simultaneously in a YouTube video.
langchain_agent.py CHANGED
@@ -50,7 +50,6 @@ class LangChainAgent:
50
  agent=agent,
51
  tools=tools,
52
  verbose=True,
53
- return_intermediate_steps=True,
54
  max_iterations=3)
55
 
56
  def __call__(self, question: str) -> str:
 
50
  agent=agent,
51
  tools=tools,
52
  verbose=True,
 
53
  max_iterations=3)
54
 
55
  def __call__(self, question: str) -> str: