[Feature Request]: Add progress_callback support to AdaptiveCrawler.digest()
#1660
blghtr
started this conversation in
Feature requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What needs to be done?
Update the
AdaptiveCrawler.digest()method to accept an optionalprogress_callbackargument. This callback should be invoked periodically during the crawling loop (e.g., after each batch of pages is processed or when the confidence score updates).Proposed signature:
What problem does this solve?
The adaptive crawling process can be long-running (crawling multiple pages, generating embeddings, analyzing relevance). Currently, the caller has zero visibility into the progress until the entire
digest()calls returns.This makes it difficult to:
Target users/beneficiaries
crawl4ai.Current alternatives/workarounds
digest()is an async blocking call that holds control until finished.Proposed approach
Inject the callback invocation inside the main
whileloop indigest():This would likely require minimal changes but add significant value for integration.
Beta Was this translation helpful? Give feedback.
All reactions