Closed mwnu closed 10 months ago
I found out where the problem is. Matrix E2EE must not be enabled (MATRIX_ENCRYPTION=false), otherwise there will be an error: 'user_id or device_id mismatch'. It means that the ChatGPT bot cannot automatically reply based on context in the thread or be privately messaged because the private chat rooms are end-to-end encrypted. The only way to trigger the bot is using !chatgpt
PREFIX and mention @
.
I noticed this as well. So what did you do, just invite the bot to an unencrypted room and mention it ?
I noticed this as well. So what did you do, just invite the bot to an unencrypted room and mention it ?
Yes, that's the only way to use it.
I'm also getting a similar error. journalctl -fu matrix-bot-chatgpt says:
Mar 21 16:02:17 localhost systemd[1]: Starting Matrix chatgpt bot...
Mar 21 16:02:18 localhost systemd[1]: Started Matrix chatgpt bot.
Mar 21 16:02:20 localhost matrix-bot-chatgpt[106873]: yarn run v1.22.19
Mar 21 16:02:20 localhost matrix-bot-chatgpt[106873]: $ node --enable-source-maps dist/index.js
Mar 21 16:02:23 localhost matrix-bot-chatgpt[106873]: Tue, 21 Mar 2023 16:02:23 GMT [INFO] [index] Starting bot using ChatGPT model: gpt-3.5-turbo
Mar 21 16:02:23 localhost matrix-bot-chatgpt[106873]: Tue, 21 Mar 2023 16:02:23 GMT [INFO] [index] Using promptPrefix: <|im_sep|>Instructions:
Mar 21 16:02:23 localhost matrix-bot-chatgpt[106873]: You are ChatGPT, a large language model trained by OpenAI.
Mar 21 16:02:23 localhost matrix-bot-chatgpt[106873]: Current date: March 21, 2023<|im_sep|>
Mar 21 16:02:23 localhost matrix-bot-chatgpt[106873]: Tue, 21 Mar 2023 16:02:23 GMT [ERROR] [MatrixHttpClient] (REQ-5) {
Mar 21 16:02:23 localhost matrix-bot-chatgpt[106873]: errcode: 'M_NOT_FOUND',
Mar 21 16:02:23 localhost matrix-bot-chatgpt[106873]: error: 'Cannot find state event for "m.room.encryption"'
Mar 21 16:02:23 localhost matrix-bot-chatgpt[106873]: }
Mar 21 16:02:23 localhost matrix-bot-chatgpt[106873]: Tue, 21 Mar 2023 16:02:23 GMT [ERROR] [MatrixHttpClient] (REQ-6) {
Mar 21 16:02:23 localhost matrix-bot-chatgpt[106873]: errcode: 'M_NOT_FOUND',
Mar 21 16:02:23 localhost matrix-bot-chatgpt[106873]: error: 'Cannot find state event for "m.room.encryption"'
Mar 21 16:02:23 localhost matrix-bot-chatgpt[106873]: }
Mar 21 16:02:23 localhost matrix-bot-chatgpt[106873]: Tue, 21 Mar 2023 16:02:23 GMT [ERROR] [MatrixHttpClient] (REQ-7) {
Mar 21 16:02:23 localhost matrix-bot-chatgpt[106873]: '@bot.chatgpt:arada.club': {
Mar 21 16:02:23 localhost matrix-bot-chatgpt[106873]: r2MmDKKj: {
Mar 21 16:02:23 localhost matrix-bot-chatgpt[106873]: error: 'user_id or device_id mismatch: users: - @bot.chatgpt:arada.club, devices: - r2MmDKKj'
Mar 21 16:02:23 localhost matrix-bot-chatgpt[106873]: }
Mar 21 16:02:23 localhost matrix-bot-chatgpt[106873]: }
Mar 21 16:02:23 localhost matrix-bot-chatgpt[106873]: }
Mar 21 16:02:23 localhost matrix-bot-chatgpt[106873]: node:internal/process/promises:289
Mar 21 16:02:23 localhost matrix-bot-chatgpt[106873]: triggerUncaughtException(err, true / fromPromise /);
Mar 21 16:02:23 localhost matrix-bot-chatgpt[106873]: ^
Mar 21 16:02:23 localhost matrix-bot-chatgpt[106873]: [UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#
However, there seems no way to make the bot react. Not even inviting it to an unencrypted room and mentioning it works.
Is there any way I can help find out what's wrong?
I found out where the problem is. Matrix E2EE must not be enabled (MATRIX_ENCRYPTION=false), otherwise there will be an error: 'user_id or device_id mismatch'. It means that the ChatGPT bot cannot automatically reply based on context in the thread or be privately messaged because the private chat rooms are end-to-end encrypted. The only way to trigger the bot is using
!chatgpt
PREFIX and mention@
.
Thanks, I also noticed this problem but didn't know that disabling encryption could be used as a workaround.
By the way, have you tried to use /converttodm after inviting the bot to a private room? Maybe that way you won't have to mention it to get a reply?
I found out where the problem is. Matrix E2EE must not be enabled (MATRIX_ENCRYPTION=false), otherwise there will be an error: 'user_id or device_id mismatch'. It means that the ChatGPT bot cannot automatically reply based on context in the thread or be privately messaged because the private chat rooms are end-to-end encrypted. The only way to trigger the bot is using
!chatgpt
PREFIX and mention@
.Thanks, I also noticed this problem but didn't know that disabling encryption could be used as a workaround.
By the way, have you tried to use /converttodm after inviting the bot to a private room? Maybe that way you won't have to mention it to get a reply?
In an encrypted room, robots cannot read the content.
My bad, i should have specified. I meant after inviting the bot to a private UNENCRYPTED room, and then entering /converttodm.
The ChatGPT bot cannot automatically reply based on context in the thread or be privately messaged because the private chat rooms are end-to-end encrypted. The only way to trigger the bot is using
!chatgpt
PREFIX and mention@
.
I found a workaround that lets you trigger the bot without having to mention it. If you send it a DM from an unverified session, the private room is unencrypted and the bot replies to everything you write.
The ChatGPT bot cannot automatically reply based on context in the thread or be privately messaged because the private chat rooms are end-to-end encrypted. The only way to trigger the bot is using
!chatgpt
PREFIX and mention@
.I found a workaround that lets you trigger the bot without having to mention it. If you send it a DM from an unverified session, the private room is unencrypted and the bot replies to everything you write.
Private rooms are always encrypted, regardless of whether your client is verified. Unencrypted rooms that have invited bots can only be triggered by using !chatgpt. I don't know what you're referring to.
The ChatGPT bot cannot automatically reply based on context in the thread or be privately messaged because the private chat rooms are end-to-end encrypted. The only way to trigger the bot is using
!chatgpt
PREFIX and mention@
.I found a workaround that lets you trigger the bot without having to mention it. If you send it a DM from an unverified session, the private room is unencrypted and the bot replies to everything you write.
Private rooms are always encrypted, regardless of whether your client is verified. Unencrypted rooms that have invited bots can only be triggered by using !chatgpt. I don't know what you're referring to.
Nope, private rooms created by an unverified session are unencrypted. Give it a try.
I have tried it, and private chats initiated from unencrypted conversations are still in encrypted rooms, but it seems that unencrypted messages can be sent. However, the robot will not respond in a private room.
Maybe it depends on which client you're using. I was using Element Android, and the DM room it created was unencrypted, and the bot replied just fine without having to mention it. Here's a couple screenshots as proof:
Anyway, at this point this is probably off-topic, so I'll let it be.
Maybe it depends on which client you're using. I was using Element Android, and the DM room it created was unencrypted, and the bot replied just fine without having to mention it. Here's a couple screenshots as proof:
What I want to say is that I have tried it and it doesn’t work.
Is this issue stale or does this still occur?
Note: I also running the bot with dendrite and need to apply the workaround with inviting the bot to an unencrypted room. But if you remove !chatgpt
and keep MATRIX_DEFAULT_PREFIX=
in the .env
file empty the bot replies to all questions. Limitation is that you can only use the bot in 1:1 chats (rooms).
Setting
MATRIX_HOMESERVER_URL
to my main domain generates an interruption error on the first run:My main domain has
well-known
configuration and connects normally with other servers and clients. If I configureMATRIX_HOMESERVER_URL
directly to my dendrite server address, It can generate aMATRIX_ACCESS_TOKEN
, but after changingMATRIX_BOT_PASSWORD
toMATRIX_ACCESS_TOKEN
, the log repeatedly produces errors and cannot be run after restarting:Whether I remove "@ and :DOMAIN" from
MATRIX_BOT_USERNAME
, or change theMATRIX_HOMESERVER_URL
, or use a new account that has never logged in before, I don't know if this bot is incompatible with dendrite or if there is a problem with my server configuration?