Skip to content

Intent-based extract parameters#142

Merged
pulvedu merged 1 commit intomasterfrom
feat/python-sdk-9134cd
Dec 12, 2025
Merged

Intent-based extract parameters#142
pulvedu merged 1 commit intomasterfrom
feat/python-sdk-9134cd

Conversation

@cursor
Copy link

@cursor cursor bot commented Dec 12, 2025

Add query and chunks_per_source parameters to the extract and crawl methods to support intent-based content extraction and chunk selection.


Open in Cursor Open in Web


Note

Adds query and chunks_per_source parameters to extract and crawl in both sync and async clients, wiring them through to API payloads.

  • Client API (sync tavily.TavilyClient and async tavily.AsyncTavilyClient):
    • Extract: Add query and chunks_per_source to method signatures; include in request payload to /extract.
    • Crawl: Add chunks_per_source to method signatures; include in request payload to /crawl.
    • Public wrappers updated to pass new args through and preserve response structure (results, failed_results).

Written by Cursor Bugbot for commit 8f63652. This will update automatically on new commits. Configure here.

@cursor
Copy link
Author

cursor bot commented Dec 12, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

Add intent-based extraction parameters:
- Extract: query (str) and chunks_per_source (int)
- Crawl: chunks_per_source (int) only
@cursor cursor bot force-pushed the feat/python-sdk-9134cd branch from 595aa31 to 8f63652 Compare December 12, 2025 21:30
@pulvedu pulvedu marked this pull request as ready for review December 12, 2025 21:35
@pulvedu pulvedu merged commit 427aac0 into master Dec 12, 2025
8 checks passed
@pulvedu pulvedu deleted the feat/python-sdk-9134cd branch December 12, 2025 21:35
Copy link
Author

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

timeout: float = 150,
include_favicon: bool = None,
include_usage: bool = None,
chunks_per_source: int = None,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Missing query parameter in crawl methods

The PR description states that both query and chunks_per_source parameters should be added to extract and crawl methods. However, while chunks_per_source was added to the crawl methods, the query parameter was only added to the extract methods and is completely missing from _crawl and crawl in both tavily.py and async_tavily.py. This incomplete implementation means users cannot use intent-based content extraction with the crawl API.

Additional Locations (1)

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants