fix: add youtube_transcript and transcribe_audio to TOOL_FUNCTIONS
Browse filesBug: Tools were registered in TOOLS dict but missing from TOOL_FUNCTIONS
mapping in graph.py, causing "Tool 'youtube_transcript' not found in TOOL_FUNCTIONS" error.
Fixed:
- Added imports: youtube_transcript, transcribe_audio
- Updated TOOL_FUNCTIONS dict in execute_node (line 268)
- Updated TOOL_FUNCTIONS dict in fallback section (line 410)
Co-Authored-By: Claude <noreply@anthropic.com>
- src/agent/graph.py +5 -1
src/agent/graph.py
CHANGED
|
@@ -19,7 +19,7 @@ from pathlib import Path
|
|
| 19 |
from typing import TypedDict, List, Optional
|
| 20 |
from langgraph.graph import StateGraph, END
|
| 21 |
from src.config import Settings
|
| 22 |
-
from src.tools import TOOLS, search, parse_file, safe_eval, analyze_image
|
| 23 |
from src.agent.llm_client import (
|
| 24 |
plan_question,
|
| 25 |
select_tools_with_function_calling,
|
|
@@ -270,6 +270,8 @@ def execute_node(state: AgentState) -> AgentState:
|
|
| 270 |
"parse_file": parse_file,
|
| 271 |
"calculator": safe_eval,
|
| 272 |
"vision": analyze_image,
|
|
|
|
|
|
|
| 273 |
}
|
| 274 |
|
| 275 |
# Initialize results lists
|
|
@@ -410,6 +412,8 @@ def execute_node(state: AgentState) -> AgentState:
|
|
| 410 |
"parse_file": parse_file,
|
| 411 |
"calculator": safe_eval,
|
| 412 |
"vision": analyze_image,
|
|
|
|
|
|
|
| 413 |
}
|
| 414 |
|
| 415 |
for tool_call in tool_calls:
|
|
|
|
| 19 |
from typing import TypedDict, List, Optional
|
| 20 |
from langgraph.graph import StateGraph, END
|
| 21 |
from src.config import Settings
|
| 22 |
+
from src.tools import TOOLS, search, parse_file, safe_eval, analyze_image, youtube_transcript, transcribe_audio
|
| 23 |
from src.agent.llm_client import (
|
| 24 |
plan_question,
|
| 25 |
select_tools_with_function_calling,
|
|
|
|
| 270 |
"parse_file": parse_file,
|
| 271 |
"calculator": safe_eval,
|
| 272 |
"vision": analyze_image,
|
| 273 |
+
"youtube_transcript": youtube_transcript,
|
| 274 |
+
"transcribe_audio": transcribe_audio,
|
| 275 |
}
|
| 276 |
|
| 277 |
# Initialize results lists
|
|
|
|
| 412 |
"parse_file": parse_file,
|
| 413 |
"calculator": safe_eval,
|
| 414 |
"vision": analyze_image,
|
| 415 |
+
"youtube_transcript": youtube_transcript,
|
| 416 |
+
"transcribe_audio": transcribe_audio,
|
| 417 |
}
|
| 418 |
|
| 419 |
for tool_call in tool_calls:
|