favstats / peRspective

An R wrapper for Conversation AI's Perspective API
https://favstats.github.io/peRspective
Other
53 stars 6 forks source link

How to change rate limit config? #9

Open bearT2 opened 2 years ago

bearT2 commented 2 years ago

Hi! I am using prsp_stream() to score around 1 million comments. I have increased the quota limit, but my requests per minute are still unchanged. Is there any rate limit config I should change to limit or remove the default limits? Thank you!

favstats commented 2 years ago

You can change the sleep parameter: the default is 0.7

bearT2 commented 2 years ago

Thank you so much! I'm very new to perspective API. I changed the sleep parameter to 0.02, 0.001, and 0.0001. The traffic increased significantly but then stayed at around 6 QPS. That's still far away from the quota I have. Not sure how to increase the traffic then...

favstats commented 2 years ago

Interesting. One reason might be because the code just can't execute faster than 6QPS because it might be written a bit inefficiently (it wasn't written for these greater quote limits in mind). One could try writing a more barebones API wrapper and it might be a bit faster but it's not something I have time for unfortunately :/

bearT2 commented 2 years ago

Thank you!