Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions code_tests/integration_tests/test_asknews.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,19 @@ async def test_formatted_deep_research() -> None:
assert len(news) > 100, "News is too short"
assert "<final_answer>" not in news, "<final_answer> is in the final answer"
assert "<think>" not in news, "<think> is in the news"


async def test_deep_research_accepts_podcasts_source() -> None:
if not os.getenv("ASKNEWS_CLIENT_ID") or not os.getenv("ASKNEWS_SECRET"):
pytest.skip("ASKNEWS_CLIENT_ID or ASKNEWS_SECRET is not set")
response = await AskNewsSearcher().run_deep_research(
"In one sentence, what is the latest news about the US federal funds rate?",
sources=["asknews", "podcasts"],
model="open-source-best",
search_depth=1,
max_depth=1,
)
content = response.choices[0].message.content
logger.info(f"Deep research with podcasts source: {content}")
assert content is not None, "Content is None"
assert len(content) > 100, "Content is too short"
11 changes: 4 additions & 7 deletions forecasting_tools/helpers/asknews_searcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ async def call_preconfigured_version(self, preset: str, prompt: str) -> str:
elif "asknews/deep-research/medium-depth" in preset:
research = await self.get_formatted_deep_research(
prompt,
sources=["asknews", "google", "x", "wiki"],
sources=["asknews", "google", "x", "wiki", "podcasts"],
filter_params={"premium": True},
search_depth=2,
max_depth=4,
Expand All @@ -173,7 +173,7 @@ async def call_preconfigured_version(self, preset: str, prompt: str) -> str:
elif "asknews/deep-research/high-depth" in preset:
research = await self.get_formatted_deep_research(
prompt,
sources=["asknews", "google", "x", "wiki"],
sources=["asknews", "google", "x", "wiki", "podcasts"],
filter_params={"premium": True},
search_depth=4,
max_depth=6,
Expand All @@ -187,10 +187,7 @@ async def get_formatted_deep_research(
self,
query: str,
sources: list[str] | None = None,
model: (
Literal["deepseek", "deepseek-basic", "claude-3-7-sonnet-latest", "o3-mini"]
| str
) = _default_model,
model: DeepNewsModel | str = _default_model,
search_depth: int = _default_search_depth,
max_depth: int = _default_max_depth,
filter_params: dict[str, bool] | None = None,
Expand Down Expand Up @@ -225,7 +222,7 @@ async def run_deep_research(
from asknews_sdk.dto.deepnews import CreateDeepNewsResponse
except ImportError:
raise ImportError(
"Most recent version of asknews package not installed, deep research will not work. Run `poetry add asknews@0.11.6`"
"Most recent version of asknews package not installed, deep research will not work. Run `poetry add asknews@0.14.2`"
)
async with AsyncAskNewsSDK(
client_id=self.client_id,
Expand Down
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ faker = ">=37.0.0,<41.0.0"
plotly = ">=5.24.1,<7.0.0"
pandas = ">=2.2.3,<4.0.0"
streamlit = "^1.20.0"
asknews = ">=0.9.1,<0.14.0"
asknews = ">=0.9.1,<0.15.0"
unidecode = "^1.4.0"
hyperbrowser = ">=0.53.0,<1.0.0"
pendulum = "^3.1.0"
Expand Down
2 changes: 1 addition & 1 deletion run_bots.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ def get_default_bot_dict() -> dict[str, RunBotConfig]: # NOSONAR
sonnet_4_5_name = "anthropic/claude-sonnet-4-5-20250929"
gemini_2_5_pro = "openrouter/google/gemini-2.5-pro" # Used to be gemini-2.5-pro-preview (though automatically switched to regular pro when preview was deprecated)
gemini_default_timeout = 5 * 60
deepnews_model = "asknews/deep-research/high-depth/claude-opus-4-6" # Switched to opus 4.6 Feb 23rd. Switched to high depth Feb 16th 2026. Switched from claude-sonnet-4-20250514 to sonnet 4.5 in Nov 2025. Switched from high to medium depth on Jan 2nd, 2026
deepnews_model = "asknews/deep-research/high-depth/claude-fable-5" # Switched to claude-fable-5 and added podcasts source Sep 5th 2026. Switched to opus 4.6 Feb 23rd. Switched to high depth Feb 16th 2026. Switched from claude-sonnet-4-20250514 to sonnet 4.5 in Nov 2025. Switched from high to medium depth on Jan 2nd, 2026

roughly_sonnet_4_cost = 0.25190
roughly_gpt_5_high_cost = 0.37868
Expand Down
Loading