Add tracing

This commit is contained in:
Lance Martin
2025-06-26 15:13:47 -07:00
parent 7482b97113
commit f0538d3e1a
2 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ cd mutli-modal-researcher
```bash
cp .env.example .env
```
Edit `.env` and add your Google Gemini API key:
Edit `.env` and [add your Google Gemini API key](https://ai.google.dev/gemini-api/docs/api-key):
```bash
GEMINI_API_KEY=your_api_key_here
```
+5 -2
View File
@@ -7,8 +7,9 @@ from google.genai import types
from agent.state import ResearchState, ResearchStateInput, ResearchStateOutput
from agent.utils import display_gemini_response, create_podcast_discussion, create_research_report, genai_client
from agent.configuration import Configuration
from langsmith import traceable
@traceable(run_type="llm", name="Web Research", project_name="multi-modal-researcher")
def search_research_node(state: ResearchState, config: RunnableConfig) -> dict:
"""Node that performs web search research on the topic"""
configuration = Configuration.from_runnable_config(config)
@@ -31,6 +32,7 @@ def search_research_node(state: ResearchState, config: RunnableConfig) -> dict:
}
@traceable(run_type="llm", name="YouTube Video Analysis", project_name="multi-modal-researcher")
def analyze_video_node(state: ResearchState, config: RunnableConfig) -> dict:
"""Node that analyzes video content if video URL is provided"""
configuration = Configuration.from_runnable_config(config)
@@ -56,7 +58,7 @@ def analyze_video_node(state: ResearchState, config: RunnableConfig) -> dict:
return {"video_text": video_text}
@traceable(run_type="llm", name="Create Report", project_name="multi-modal-researcher")
def create_report_node(state: ResearchState, config: RunnableConfig) -> dict:
"""Node that creates a comprehensive research report"""
configuration = Configuration.from_runnable_config(config)
@@ -76,6 +78,7 @@ def create_report_node(state: ResearchState, config: RunnableConfig) -> dict:
}
@traceable(run_type="llm", name="Create Podcast", project_name="multi-modal-researcher")
def create_podcast_node(state: ResearchState, config: RunnableConfig) -> dict:
"""Node that creates a podcast discussion"""
configuration = Configuration.from_runnable_config(config)