Find answers from the community

Updated 2 years ago

Hi I am trying to build QA bot on slack

Hi, I am trying to build QA bot on slack channel. Referred to this notebook to give a start - https://github.com/jerryjliu/gpt_index/blob/main/examples/data_connectors/SlackDemo.ipynb. But I am getting the following error.

ERROR:gpt_index.readers.slack:Error creating conversation: The request to the Slack API failed. (url: https://www.slack.com/api/conversations.replies)
The server responded with: {'ok': False, 'error': 'ratelimited'}

Though the error is regarding rate limit. I am confused how to resolve it. Any directions @jerryjliu0 or anyone can give?
1
j
r
B
17 comments
@ravitheja how much are you hitting the slack API ?
@jerryjliu0 I think the error is because of a slack channel having 12k+ messages so it's going to rate limit error. I tried the same with a sample slack channel with 10 messages it's working pretty fine. Any idea on how to proceed further for channel with lot of messages?
I cross-checked, after around 150 hits, I am getting this error.
got it, interesting. the slack reader currently does paginated calls
we could add an option to wait in between each paginated call?
Yeah. Currently testing it.
@jerryjliu0 I just read the slack api docs. So, converations_history and conversations_replies comes under Tier 3 methods. Tier 3 methods have a hit rate limit of 50-100 per minute I guess. Check here - Web API Tier 3 rate limit - https://api.slack.com/docs/rate-limits#:~:text=If%20you%20exceed%20a%20rate,seconds%20until%20you%20can%20retry . So I guess we should keep a waiting option between calls. What do you think?
Ravi, you may want to take a look at this. I don't know what you're using for API retries, but I'm trying to figure out how to implement something similar and figured I'd share: https://learn.temporal.io/tutorials/typescript/chatbot/
Checking on it.
I was having this similar issue. @ravitheja did waiting between calls work for you?
Also the codebase is updated now. So, it should read total chat with wait time whenever ratelimit error is reached. @EJ Oruche
ah i see, so I did see that in the slack reader code was i was debugging. Perhaps my issue is different then. I assumed it was related b/c the whole process timed out
okay. so what is something that caused the error?
im not totally clear, I have the traceback. I will caveat im not strong in python so it could be user error
okay. are you trying it on windows machine? possible to once try on google colab? @EJ Oruche
@ravitheja im on a mac, doing it locally
Add a reply
Sign up and join the conversation on Discord