Closed evangriffiths closed 1 month ago
The changes in this pull request focus on modifying the tavily_search
function and its helper _tavily_search
. The updates enhance error handling by enforcing constraints on the days
parameter based on the topic
specified. New checks are introduced to raise ValueError
for invalid combinations of topic
and days
. Additionally, the logic for handling the days
parameter in _tavily_search
is improved to construct a conditional dictionary for API calls, thus preventing errors when days
is None
.
File Path | Change Summary |
---|---|
prediction_market_agent_tooling/tools/tavily/tavily_search.py | - Enhanced error handling in tavily_search for topic and days parameter combinations. - Updated _tavily_search to use a conditional dictionary for the days parameter. |
tavily_search
function and its internal helper _tavily_search
, specifically regarding the handling of the days
parameter, which directly relates to the enhancements made in the main PR for error handling and logic refinement based on the topic
.Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
This test:
previously would error if days=None:
Now it passes.