Update tools.py
Browse files
tools.py
CHANGED
@@ -16,14 +16,6 @@ import re
|
|
16 |
import time
|
17 |
from typing import Optional, List, Dict, Any
|
18 |
|
19 |
-
def tools_condition(state: AgentState) -> Optional[str]:
|
20 |
-
last = state["messages"][-1]
|
21 |
-
if isinstance(last, HumanMessage):
|
22 |
-
content = last.content.lower()
|
23 |
-
if "youtube.com" in content or "youtu.be" in content:
|
24 |
-
return "analyze_youtube_video"
|
25 |
-
return None
|
26 |
-
|
27 |
# class WebSearchTool:
|
28 |
# def __init__(self):
|
29 |
# self.last_request_time = 0
|
|
|
16 |
import time
|
17 |
from typing import Optional, List, Dict, Any
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
# class WebSearchTool:
|
20 |
# def __init__(self):
|
21 |
# self.last_request_time = 0
|