cycneuramus / signal-aichat

An AI chatbot for Signal powered by Google Bard, Bing Chat, ChatGPT, HuggingChat, and llama.cpp
GNU Affero General Public License v3.0
80 stars 15 forks source link
ai-bot bard bing-chat chatgpt chatgpt-bot google-bard huggingchat llama llamacpp signal-bot signal-messenger

NOTE

This project is currently archived. The relevant API:s and libraries are constantly shifting, and I don't have time to keep up.


signal-aichat is an AI-powered chatbot for the Signal messenger app. It currently supports:


Setup instructions

0. Clone this repo

git clone https://github.com/cycneuramus/signal-aichat


1. signald

Chatting with your own number via "Note to Self" does not work. This assumes you will be using a separate Signal account for the bot.

Start the signald container:

docker compose up -d signald

Drop into the container's shell:

docker exec -it signal-aichat-signald /bin/bash

Once inside the container, either:

# link to an existing account:
$ signaldctl account link --device-name signal-aichat

or

# register a new account:
$ signaldctl account register [phone number]

For more information, see the documentation for signald.

Once the account is setup, populate the SIGNAL_PHONE_NUMBER variable in the .env file.


2. Google Bard

See the Bard repository. TL;DR:

Go to https://bard.google.com/


3. Bing Chat

See the EdgeGPT repository. TL;DR:

Checking access - Install the latest version of Microsoft Edge - Alternatively, you can use any browser and set the user-agent to look like you're using Edge (e.g., `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36 Edg/111.0.1661.51`). You can do this easily with an extension like "User-Agent Switcher and Manager" for [Chrome](https://chrome.google.com/webstore/detail/user-agent-switcher-and-m/bhchdcejhohfmigjafbampogmaanbfkg) and [Firefox](https://addons.mozilla.org/en-US/firefox/addon/user-agent-string-switcher/). - Open [bing.com/chat](https://bing.com/chat) - If you see a chat feature, you are good to go
Getting authentication - Install the cookie editor extension for [Chrome](https://chrome.google.com/webstore/detail/cookie-editor/hlkenndednhfkekhgcdicdfddnkalmdm) or [Firefox](https://addons.mozilla.org/en-US/firefox/addon/cookie-editor/) - Go to `bing.com` - Open the extension - Click "Export" on the bottom right, then "Export as JSON" (this saves your cookies to the clipboard) - Paste your cookies into a file named `bing.json`

Make sure to add the exported JSON to the config/bing.json file in this repo directory.


4. ChatGPT


5. HuggingChat

See the HuggingChat API repository. TL;DR:

Make sure to add the exported JSON to the config/hugchat.json file in this repo directory.


6. Llama models


7. Additional configuration

In .env:

Assuming DEFAULT_MODEL=gpt, for example, you'd be able to chat normally:


8. Deploy

And start chatting.