arc53 / DocsGPT

Chatbot for documentation, that allows you to chat with your data. Privately deployable, provides AI knowledge sharing and integrates knowledge into your AI workflow
https://app.docsgpt.cloud/
MIT License
14.86k stars 1.57k forks source link

Add throttling to frontend api calls #162

Open ajaythapliyal opened 1 year ago

abdulriiyaz commented 1 year ago

Could you please provide a brief question related to adding throttling to frontend API call?

We can always use throttle-debounce.

I'm open to contribute to this amazing project!

codingmickey commented 1 year ago

Heyy, I would like to get this thing done!! @dartpain Can you assign it to me as there wasn't any active response from the last guy :(

dartpain commented 1 year ago

yep, assigning, thank you!

gauravdhiman217 commented 1 year ago

@codingmickey Hey there, are you still working on it. @dartpain if no-one is working on it i will love to contribute.

codingmickey commented 1 year ago

Yupp expect a PR for review soon 👍🏼

On Mon, Oct 9, 2023, 10:45 AM Gaurav Dhiman @.***> wrote:

@codingmickey https://github.com/codingmickey Hey there, are you still working on it. @dartpain https://github.com/dartpain if no-one is working on it i will love to contribute.

— Reply to this email directly, view it on GitHub https://github.com/arc53/DocsGPT/issues/162#issuecomment-1752358347, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKEMS66I5ILNTNJHCSLLQIDX6OB7BAVCNFSM6AAAAAAVTHM7SWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJSGM2TQMZUG4 . You are receiving this because you were mentioned.Message ID: @.***>

dartpain commented 11 months ago

Hi @codingmickey How is the progress?

Thank you!

abdulriiyaz commented 9 months ago

@gauravdhiman217 you can, im marking.

surajTade commented 1 week ago

@ajaythapliyal / @dartpain I noticed that this issue is still open. Can I work on it? Are there any specific requirements regarding throttling, such as the time interval between requests? Should I use a particular library, or would you prefer that I develop an in-house throttler?

surajTade commented 1 week ago

@dartpain Few questions before I start coding:

  1. Should I implement the throttling at the service layer (/frontend/src/api/client.ts) or at specific locations where the service is being used?
  2. Do we want a custom throttling logic, or we can use an external dependency?
siiddhantt commented 1 week ago

hi @surajTade , thanks for your interest in working on this issue. Yes please implement the throttling at the service layer and you're welcome to use an external dependency for simplicity and reliability as long as they are light.

surajTade commented 1 week ago

hii @siiddhantt can you be more specific about what all needs to be implemented here? I understand that the backend should not get overwhelmed with the number of requests, but "Add throttling seems to be very superficial.

I tried implementing this throttling logic with limit, although I'm not sure if this is what was expected as per the request. please review and let me know if something needs to be changed: https://github.com/arc53/DocsGPT/pull/1265