from exa_py import Exa
exa = Exa()
run = exa.agent.runs.create(
query=(
"Give me an investor briefing on NVIDIA (NVDA): (1) the latest financial and "
"earnings news, and (2) what podcast hosts and guests have recently been saying "
"about NVIDIA, with speaker-attributed quotes and their stance."
),
data_sources=[
{"provider": "financial_datasets"},
{"provider": "particle_news"},
],
output_schema={
"type": "object",
"required": ["ticker", "financialNews", "podcastChatter"],
"properties": {
"ticker": {"type": "string"},
"financialNews": {
"type": "array",
"maxItems": 6,
"items": {
"type": "object",
"required": ["title", "source", "date", "theme"],
"properties": {
"title": {"type": "string"},
"source": {"type": "string"},
"date": {"type": "string"},
"theme": {"type": "string", "description": "earnings, guidance, analyst rating, product, or market"},
},
},
},
"podcastChatter": {
"type": "array",
"maxItems": 6,
"items": {
"type": "object",
"required": ["podcast", "speaker", "quote", "stance"],
"properties": {
"podcast": {"type": "string"},
"speaker": {"type": "string"},
"quote": {"type": "string"},
"stance": {"type": "string", "description": "bullish, bearish, or neutral"},
},
},
},
},
},
)
run = exa.agent.runs.poll_until_finished(run.id)