-
Notifications
You must be signed in to change notification settings - Fork 289
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
FEAT: Added "Run All Prompts" with Concurrent API Request Queuing Mechanism #749
Conversation
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.
Left some NIT comments. You can do it later. Other things seems good to me.
frontend/src/components/custom-tools/manage-docs-modal/ManageDocsModal.jsx
Outdated
Show resolved
Hide resolved
frontend/src/components/custom-tools/document-parser/DocumentParser.jsx
Outdated
Show resolved
Hide resolved
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.
@tahierhussain One quick question here, will this have impact in the PLG features where we make similar calls. We don't make runs in public share, but I am bit concerned about SPS.
@harini-venkataraman Yes. We don't make run calls in public share. SPS should work fine with minimal changes in the FE. I will be picking it up after we're done with the architectural changes in the FE. |
|
|
What
Why
To enhance the user experience, we implemented "Run All" buttons, allowing users to execute prompts across multiple LLM profiles and documents. However, when too many concurrent API requests were triggered, the application's performance degraded significantly. This occurred because browsers typically handle only 6-7 concurrent API calls at a time, leaving the remaining requests in a pending state. As a result, this increased memory usage and caused the application to slow down.
How
A queuing mechanism has been introduced to limit the number of concurrent API requests to a maximum of 5. API calls beyond this limit are placed in a queue and are processed as ongoing requests complete. This approach ensures stable performance while efficiently handling multiple API calls.
Can this PR break any existing features. If yes, please list possible items. If no, please explain why. (PS: Admins do not merge the PR without this section filled)
Yes. This PR contains major architectural changes in the Prompt Studio, specifically in how the prompt run APIs are handled.
Database Migrations
NA
Env Config
NA
Relevant Docs
NA
Related Issues or PRs
NA
Dependencies Versions
NA
Notes on Testing
NA
Screenshots
Checklist
I have read and understood the Contribution Guidelines.