-
Notifications
You must be signed in to change notification settings - Fork 16k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
langchain: included concurrency limit in RecursiveUrlLoader #15537
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
return [] | ||
|
||
# Wait if the concurrent requests limit is reached | ||
if semaphore.locked(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's this needed for, doesn't L241 already handle this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I included it to allow the loader to complete as many requests as possible once the limit is reached before sending other requests. My idea was to insert a delay to avoid HTTP errors caused by an excessive number of simultaneous requests.
If you think that's redundant I can quickly update the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@baskaryan could you please tell me if I need to update the code?
concurrent_requests_limit
argument.asyncio
,time
.