Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Increasing response speed and checking membership #1

Open
RoozbehSh opened this issue Apr 1, 2023 · 4 comments
Open

Increasing response speed and checking membership #1

RoozbehSh opened this issue Apr 1, 2023 · 4 comments

Comments

@RoozbehSh
Copy link

Hi! thanks for your great work, I've been trying its functionality for a few days.
I have 2 questions, or probably one question and one feature request.
1- My question is how to improve the response rate of the robot? is open ai premium going to be useful? and also how many users can use flows.network simultaneously? I want to know the safe margin for the bot to work smoothly
2- I wanted to add a section to the code so it checks if a user has joined a specific private channel to respond or not. I want to use this method so I can control who is using the bot to limit its load. I've tried teloxide and tg-botapi but I keep getting errors over tokio inconsistency with wasm. I would really appreciate your help as I'm not a rust developer.

thanks for your time and response in advance

@juntao
Copy link
Contributor

juntao commented Apr 1, 2023

Re Response time: I think the main limiting factor is on the OpenAI side as it takes almost a minute to respond to a GPT4 request, which results in time out. Flows.network is mostly waiting for OpenAI to respond.

For now, I think using GPT35Turbo model will give you a consistent response time within 30 seconds.

Re Checking telegram APIs: We would love to help. Can you tel us know which telegram API you would like to call? We are likely able to do that in the flows telegram SDK instead of making direct calls from inside Rust / Wasm. Thanks.

@RoozbehSh
Copy link
Author

Thanks for your response.
Based on what you said, the premium account and GPT4 would cause more delay.
For the telegram feature, as I said I wanted to include this ability in the bot that checks whether it should provide service to a user before responding to limit the load. My first thought was to ask those users to join a private channel so the bot could check if they were a member or not. I haven't worked with telegram SDK so I'm completely open to new ideas, how do you think this problem should be approached? I appreciate your help. I think this feature would also be nice in other branches such as the discord bot.
thanks for your time and response in advance

@alabulei1
Copy link
Contributor

Hi @RoozbehSh,

Based on what you've shared with us, here is my understanding of the scenario you want to implement:

  1. chatting with this telegram bot via DM is open to all telegram users, but only some of the users have been tagged as members by you like joining your channel.
  2. When a user asks the bot a question via DM, the bot will check whether or not the user has been tagged as a member before answering.
  3. If the user is a member, the bot will proceed to answer their question. If the user is not a member, the bot will respond with a message indicating that they are not a member and encouraging them to join your channel.

Please correct me if I'm wrong. Thanks. By the way, the quickest way to offer your members a ChatGPT service is to add the bot to a private/public channel where only your members can access it.

@RoozbehSh
Copy link
Author

Hi @alabulei1 , thanks for your response
Yes, that was my intention. I thought having a private channel would be easier to manage the people who have access to the bot.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants