danielgross / whatsapp-gpt

MIT License
3.07k stars 596 forks source link

Multiple issues and/or strange behaviors and/or feature requests? Not sure about #68

Open MeinDeutschkurs opened 1 year ago

MeinDeutschkurs commented 1 year ago

Edit: I started to edit the files with the support by ChatGPT - as said, I have no idea about coding - to get better results. Except of issues 1,2,3, I was able to find solutions. I plan to publish a fork, as soon as I know how to. :D - Issue 5 is not under control, WhatsApp-API does not provide messages after changing the messages to auto-delete (disappearing messages, even it's changed back to "off").


First of all, "whatsapp-gpt" is a fantastic and powerful project! Thank you so much for your work. I tested it extensively and some things came up:

I discovered that the scripts work best with the legacy model. With all other models, I encounter many server error 500 messages.

1. mixture of mixtures Every WhatsApp chat is combined into the same ChatGPT chat. As a result, the context is mixed up due to multiple different user inputs. Is it possible to have the script open new conversations for new participants and keep them in their chat window? I discovered that every participant already receives only their reply, so this idea came up.

2. WhatsUp Reply Action If users use the reply button in WhatsApp, the request is not recognized by whatsapp-gpt. It could be helpful to transmit the full context to ChatGPT with the new text so that the reply can be more accurate. Is this a feature request or a bug?

3. Group-Messages If users are part of a group, the reply from the bot is submitted privately and not inside the group. Is there a way to prevent replies in general or to populate replies for questions in groups directly in groups?

4. general prompt / prompt as message injections I experimented with priming by submitting an initial prompt to prompt ChatGPT to act as a German teacher. That works fine. Is there any way to ensure that certain prompts will be added to every message from a user? I want to avoid users having to re-prompt themselves. For instance: $user_message + "\n\nREMEMBER: 1. start your reply with "(KI-BOT): " and use only the German language for your reply (except if I asked you to do it differently), 2. please correct my input. 3. answer my question."

5a. auto-deletion function avoids reply? 5b. non-latin-charset-account avoids reply? Further, sometimes it simply does not work to reply automatically to some of the WhatsApp-accounts. It worked before, but suddenly it stopped. Whereas it works for other accounts. I think this may have something to do with the auto-deletion of messages after a period of time. Once this was set - even for a very short period of time - it never works again. Maybe this needs special handling at the API of WhatsApp? I dunno. Maybe this has something to do with non-latin-charset-accounts?

6. auto-split of messages longer than X words? I also search for a way to split up to long prompts from the user in multiple parts, so that ChatGPT can reply in summary. It then should also say something as "please type 'continue' to get the next part". I'd have an idea how to prompt something like this to ChatGPT that it does not get confused by other requests between, but I have no idea how to code this.

7. Cursor must be set to the input field The Cursor must be inside the field. So the focus must be inside the textfield at ChatGPT. Otherwise it does not work. Maybe the focus can be set by the script before submitting anything?

8. "Dead token" error. (If this issue... contact OpenAI) After some days, even after a restart of every thing, it started to produce troubles after some messages and a longer break between the messages.

This project is so helpful and clever. Unfortunately, I have no experience in programming. But I can read code, and I think that I can copy and paste things to specific locations. In this case, I don't want to ask ChatGPT for this, as it could warn me about the use of ChatGPT, and it could also harm this beautiful project.

Thank you so much for your guidance and/or tips and/or consideration of some of the possible feature requests.

Have a happy day, Johannes

MeinDeutschkurs commented 1 year ago

Is this project still under development?