interefence between rooms #14

Closed
opened 2023-05-22 23:57:45 +00:00 by jaodei · 21 comments
jaodei commented 2023-05-22 23:57:45 +00:00 (Migrated from github.com)

Hi there,

I found if I have two or more rooms chatting with say Bing Chat, there are some interefence between them. It seems the bot considers it's talking to the same person. This could be a privacy issue, if two people chatting with the bot and one guy can even guess what questions the other guy asked. Is there possible to isolate rooms? Cheers.

Hi there, I found if I have two or more rooms chatting with say Bing Chat, there are some interefence between them. It seems the bot considers it's talking to the same person. This could be a privacy issue, if two people chatting with the bot and one guy can even guess what questions the other guy asked. Is there possible to isolate rooms? Cheers.
hibobmaster commented 2023-05-23 00:19:14 +00:00 (Migrated from github.com)

It's possible but at the moment, the simplest way is deploy several matrix_chatgpt_bots, node-chatgpt-api instances and limit bot only working on specific room by setting room_id configuration.

It's possible but at the moment, the simplest way is deploy several matrix_chatgpt_bots, node-chatgpt-api instances and limit bot only working on specific room by setting `room_id` configuration.
jaodei commented 2023-05-23 00:29:52 +00:00 (Migrated from github.com)

In this case, I assume we need different tokens for different instances? Like different Microsoft account for different instances?

How much computer resources will each instance require?

Thanks

In this case, I assume we need different tokens for different instances? Like different Microsoft account for different instances? How much computer resources will each instance require? Thanks
hibobmaster commented 2023-05-23 00:45:21 +00:00 (Migrated from github.com)

No need to use different tokens, just one token is enough.

You can use docker stats to measure compute resource occupation.

No need to use different tokens, just one token is enough. You can use `docker stats` to measure compute resource occupation.
hibobmaster commented 2023-05-23 00:50:52 +00:00 (Migrated from github.com)

Here is a sample compose file
If you use env file
Add ROOM_ID to env1,env2,env3
If you use config.json
Add room_id to config1.json, config2.json, config3.json

services:
  app1:
    image: hibobmaster/matrixchatgptbot:latest
    container_name: matrix_chatgpt_bot_1
    restart: always
    # build:
    #   context: .
    #   dockerfile: ./Dockerfile
    env_file:
      - .env1
    volumes:
      # use env file or config.json
      # - ./config1.json:/app/config.json
      # use touch to create an empty file db, for persist database only
      - ./db1:/app/db
      # import_keys path
      # - ./element-keys.txt:/app/element-keys.txt
    networks:
      - matrix_network
  app2:
    image: hibobmaster/matrixchatgptbot:latest
    container_name: matrix_chatgpt_bot_2
    restart: always
    # build:
    #   context: .
    #   dockerfile: ./Dockerfile
    env_file:
      - .env2
    volumes:
      # use env file or config.json
      # - ./config2.json:/app/config.json
      # use touch to create an empty file db, for persist database only
      - ./db2:/app/db
      # import_keys path
      # - ./element-keys.txt:/app/element-keys.txt
    networks:
      - matrix_network
  app3:
    image: hibobmaster/matrixchatgptbot:latest
    container_name: matrix_chatgpt_bot_3
    restart: always
    # build:
    #   context: .
    #   dockerfile: ./Dockerfile
    env_file:
      - .env3
    volumes:
      # use env file or config.json
      # - ./config3.json:/app/config.json
      # use touch to create an empty file db, for persist database only
      - ./db3:/app/db
      # import_keys path
      # - ./element-keys.txt:/app/element-keys.txt
    networks:
      - matrix_network
  api:
  # bing api
    image: ghcr.io/waylaidwanderer/node-chatgpt-api:latest
    container_name: node-chatgpt-api
    restart: always
    volumes:
      - ./settings.js:/var/chatgpt-api/settings.js
    networks:
      - matrix_network

networks:
  matrix_network:
Here is a sample compose file If you use env file Add `ROOM_ID` to env1,env2,env3 If you use config.json Add `room_id` to config1.json, config2.json, config3.json ```yaml services: app1: image: hibobmaster/matrixchatgptbot:latest container_name: matrix_chatgpt_bot_1 restart: always # build: # context: . # dockerfile: ./Dockerfile env_file: - .env1 volumes: # use env file or config.json # - ./config1.json:/app/config.json # use touch to create an empty file db, for persist database only - ./db1:/app/db # import_keys path # - ./element-keys.txt:/app/element-keys.txt networks: - matrix_network app2: image: hibobmaster/matrixchatgptbot:latest container_name: matrix_chatgpt_bot_2 restart: always # build: # context: . # dockerfile: ./Dockerfile env_file: - .env2 volumes: # use env file or config.json # - ./config2.json:/app/config.json # use touch to create an empty file db, for persist database only - ./db2:/app/db # import_keys path # - ./element-keys.txt:/app/element-keys.txt networks: - matrix_network app3: image: hibobmaster/matrixchatgptbot:latest container_name: matrix_chatgpt_bot_3 restart: always # build: # context: . # dockerfile: ./Dockerfile env_file: - .env3 volumes: # use env file or config.json # - ./config3.json:/app/config.json # use touch to create an empty file db, for persist database only - ./db3:/app/db # import_keys path # - ./element-keys.txt:/app/element-keys.txt networks: - matrix_network api: # bing api image: ghcr.io/waylaidwanderer/node-chatgpt-api:latest container_name: node-chatgpt-api restart: always volumes: - ./settings.js:/var/chatgpt-api/settings.js networks: - matrix_network networks: matrix_network: ```
hibobmaster commented 2023-05-23 01:01:42 +00:00 (Migrated from github.com)

One more suggestion, use a non-existed room_id at first time launch to let the bot sync and store message in db, then stop it and correct the room_id to let the bot work as usual so as not to mess up room chatting timeline.

One more suggestion, use a non-existed room_id at first time launch to let the bot sync and store message in db, then stop it and correct the room_id to let the bot work as usual so as not to mess up room chatting timeline.
jaodei commented 2023-05-23 04:24:32 +00:00 (Migrated from github.com)

sounds reasonable. Thank you.

sounds reasonable. Thank you.
seshubonam commented 2023-05-27 09:43:56 +00:00 (Migrated from github.com)

https://github.com/matrixgpt/matrix-chatgpt-bot this works across different rooms, is there any solution to make your implementation work in a similar way where only one bot is created and different rooms can access it independently without cross talk

https://github.com/matrixgpt/matrix-chatgpt-bot this works across different rooms, is there any solution to make your implementation work in a similar way where only one bot is created and different rooms can access it independently without cross talk
hibobmaster commented 2023-05-27 10:06:10 +00:00 (Migrated from github.com)

https://github.com/matrixgpt/matrix-chatgpt-bot this works across different rooms, is there any solution to make your implementation work in a similar way where only one bot is created and different rooms can access it independently without cross talk

I have to refactor the codes to archieve it, so at this time the simplest way is to launch serveral bot instances.

> https://github.com/matrixgpt/matrix-chatgpt-bot this works across different rooms, is there any solution to make your implementation work in a similar way where only one bot is created and different rooms can access it independently without cross talk I have to refactor the codes to archieve it, so at this time the simplest way is to launch serveral bot instances.
seshubonam commented 2023-05-27 10:14:13 +00:00 (Migrated from github.com)

sure got it. amazing implementation, but to use within an application im working on, would be useful if there is one chatbot username that works across rooms. so ill stay tuned for any update. for now im thinking of using https://github.com/matrixgpt/matrix-chatgpt-bot for the chat management and replace the reverse proxy url with different models, as shown in this implementation, which works like a drop in replacement fro openai url: https://github.com/go-skynet/LocalAI

sure got it. amazing implementation, but to use within an application im working on, would be useful if there is one chatbot username that works across rooms. so ill stay tuned for any update. for now im thinking of using https://github.com/matrixgpt/matrix-chatgpt-bot for the chat management and replace the reverse proxy url with different models, as shown in this implementation, which works like a drop in replacement fro openai url: https://github.com/go-skynet/LocalAI
hibobmaster commented 2023-05-27 10:17:09 +00:00 (Migrated from github.com)

would be useful if there is one chatbot username that works across rooms.

When you launch serveral bot instances, you can use the same username.
The only difference among the instances is room_id in config file.

>would be useful if there is one chatbot username that works across rooms. When you launch serveral bot instances, you can use the same username. The only difference among the instances is `room_id` in config file.
seshubonam commented 2023-05-27 10:46:24 +00:00 (Migrated from github.com)

oh interesting! thanks will do that

oh interesting! thanks will do that
hibobmaster commented 2023-05-28 16:24:57 +00:00 (Migrated from github.com)

@jaodei @seshubonam
With pandora: https://github.com/pengzhile/pandora/blob/master/doc/wiki_en.md
I can integrated chatGPT web with session isolation like what i did for https://github.com/hibobmaster/mattermost_bot
Maybe there will be three new commands: !talk, !goon, !new

@jaodei @seshubonam With pandora: https://github.com/pengzhile/pandora/blob/master/doc/wiki_en.md I can integrated chatGPT web with session isolation like what i did for https://github.com/hibobmaster/mattermost_bot Maybe there will be three new commands: `!talk`, `!goon`, `!new`
seshubonam commented 2023-05-28 16:58:09 +00:00 (Migrated from github.com)

awesome!
with flowise i think that problem is solved automatically as flowise responses have sessions taken care. should run and see. waiting to host the flowise on my url. once done, ill update that

awesome! with flowise i think that problem is solved automatically as flowise responses have sessions taken care. should run and see. waiting to host the flowise on my url. once done, ill update that
hibobmaster commented 2023-05-30 02:52:53 +00:00 (Migrated from github.com)
https://github.com/hibobmaster/matrix_chatgpt_bot/commit/c72e6d6f8e178c5bb4a9e8ef5d1901cb8b4892f2
jaodei commented 2023-05-31 04:07:17 +00:00 (Migrated from github.com)

so, if I add "flowise_api_url": "http://localhost:3000/api/v1/prediction/6deb3c89-45bf-4ac4-a0b0-b2d5ef249d21" in the config file, I can avoid the intereference between rooms?

How can I obtian an id like 6deb3c89-45bf-4ac4-a0b0-b2d5ef249d21 here and the flowise_api_key? I need both of them?

thanks.

so, if I add "flowise_api_url": "http://localhost:3000/api/v1/prediction/6deb3c89-45bf-4ac4-a0b0-b2d5ef249d21" in the config file, I can avoid the intereference between rooms? How can I obtian an id like 6deb3c89-45bf-4ac4-a0b0-b2d5ef249d21 here and the flowise_api_key? I need both of them? thanks.
hibobmaster commented 2023-05-31 04:23:22 +00:00 (Migrated from github.com)

I can avoid the intereference between rooms?

No, you still need launch several instances. The only one that avoid the intereference between rooms is ChatGPT WEB used by !talk !goon !new commands.

flowise_api_key is optional.
6deb3c89-45bf-4ac4-a0b0-b2d5ef249d21 There is a code button in the upper right area. You can click it and it will tell you.

> I can avoid the intereference between rooms? No, you still need launch several instances. The only one that avoid the intereference between rooms is ChatGPT WEB used by `!talk` `!goon` `!new` commands. `flowise_api_key` is optional. `6deb3c89-45bf-4ac4-a0b0-b2d5ef249d21` There is a code button in the upper right area. You can click it and it will tell you.
seshubonam commented 2023-05-31 05:36:24 +00:00 (Migrated from github.com)

just on a side note, could adding new instances be automated. like, when user clicks create room button, a new config file or .env content is added

that work without having to restart any docker/cloud instances right

just on a side note, could adding new instances be automated. like, when user clicks create room button, a new config file or .env content is added that work without having to restart any docker/cloud instances right
seshubonam commented 2023-05-31 05:52:15 +00:00 (Migrated from github.com)

can i add a replit bounty to fix this, if you dont mind. would like to use it to beta test a chatbot im building. dm me on twitter please, id like some continued support, as your work is greaaaat https://twitter.com/seshubon

can i add a replit bounty to fix this, if you dont mind. would like to use it to beta test a chatbot im building. dm me on twitter please, id like some continued support, as your work is greaaaat https://twitter.com/seshubon
hibobmaster commented 2023-05-31 07:40:02 +00:00 (Migrated from github.com)

just on a side note, could adding new instances be automated. like, when user clicks create room button, a new config file or .env content is added

that work without having to restart any docker/cloud instances right

This solution is ugly, i will try to refactor codes to archive session isolation for all chat commands.

> just on a side note, could adding new instances be automated. like, when user clicks create room button, a new config file or .env content is added > > that work without having to restart any docker/cloud instances right This solution is ugly, i will try to refactor codes to archive session isolation for all chat commands.
seshubonam commented 2023-05-31 08:36:04 +00:00 (Migrated from github.com)

😅😂 sure thanks

😅😂 sure thanks
seshubonam commented 2023-05-31 08:55:44 +00:00 (Migrated from github.com)

Thanking you for the contributions on your repo is an understatement. you
are a champion!

On Wed, May 31, 2023, 1:10 PM BobMaster @.***> wrote:

just on a side note, could adding new instances be automated. like, when
user clicks create room button, a new config file or .env content is added

that work without having to restart any docker/cloud instances right

This solution is ugly, i will try to refactor codes to archive session
isolation for all chat commands.


Reply to this email directly, view it on GitHub
https://github.com/hibobmaster/matrix_chatgpt_bot/issues/14#issuecomment-1569659259,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AANNCJTFPDDBV2MAWT6YWZTXI3YVZANCNFSM6AAAAAAYLDBX4U
.
You are receiving this because you were mentioned.Message ID:
@.***>

Thanking you for the contributions on your repo is an understatement. you are a champion! On Wed, May 31, 2023, 1:10 PM BobMaster ***@***.***> wrote: > just on a side note, could adding new instances be automated. like, when > user clicks create room button, a new config file or .env content is added > > that work without having to restart any docker/cloud instances right > > This solution is ugly, i will try to refactor codes to archive session > isolation for all chat commands. > > — > Reply to this email directly, view it on GitHub > <https://github.com/hibobmaster/matrix_chatgpt_bot/issues/14#issuecomment-1569659259>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AANNCJTFPDDBV2MAWT6YWZTXI3YVZANCNFSM6AAAAAAYLDBX4U> > . > You are receiving this because you were mentioned.Message ID: > ***@***.***> >
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: bobmaster/matrix_chatgpt_bot#14
No description provided.