prebuilt.ai_insight.agent¶
General News Reporter Agent implementation.
Classes¶
General news reporter agent that can cover any topic. |
Functions¶
|
Route based on filtered articles. |
|
Route based on search results. |
|
Route based on summaries. |
Module Contents¶
- class prebuilt.ai_insight.agent.NewsReporterAgent¶
Bases:
haive.agents.base.agent.Agent
General news reporter agent that can cover any topic.
The agent intelligently: - Searches for news on the given topic - Categorizes articles based on their content - Generates appropriate summaries for the target audience - Identifies trends from the actual content - Creates a well-structured report
- build_graph()¶
Build the news reporting workflow graph.
- Return type:
haive.core.graph.state_graph.base_graph2.BaseGraph
- handle_insufficient_content(state)¶
Handle case when there’s insufficient content.
- Parameters:
state (haive.prebuilt.ai_insight.state.NewsReporterState)
- Return type:
haive.prebuilt.ai_insight.state.NewsReporterState
- handle_no_results(state)¶
Handle case when no results are found.
- Parameters:
state (haive.prebuilt.ai_insight.state.NewsReporterState)
- Return type:
haive.prebuilt.ai_insight.state.NewsReporterState
- prebuilt.ai_insight.agent.route_after_filter(state)¶
Route based on filtered articles.
- Parameters:
state (haive.prebuilt.ai_insight.state.NewsReporterState)
- Return type:
- prebuilt.ai_insight.agent.route_after_search(state)¶
Route based on search results.
- Parameters:
state (haive.prebuilt.ai_insight.state.NewsReporterState)
- Return type: