A simple Signal-based AI chatbot.
- TypeScript, Node, TSX: run
.tsfiles on server signal-cli: communicate with signal- OpenAI: provides
gpt-4oaccess - Vercel AI SDK: abstract LLM provider
- doesn't provide much utility for this particular project, but it's how I'm used to interacting with OpenAI
- Langfuse: log LLM interactions
-
Run
npm ito install dependencies -
Copy
.env.exampleto.env -
Set up signal-cli
- Follow these instructions to set up signal-cli if you haven't already: https://github.com/AsamK/signal-cli
- Update .env file with signal-cli details.
-
Set up OpenAI
- Create a OpenAI account if you haven't already.
- Go to https://platform.openai.com/api-keys and click "Create new secret key"
- Update .env file with OpenAI details.
-
Set up Langfuse
- Create a Langfuse account if you haven't already.
- Create a new project.
- Update .env file with Langfuse details
-
For each number you want to be able to communicate with the bot, you must have the bot send them a message first.
- You can send this message with
Where the first number is your bot and the second is the recipient that you want to be able to communicate with your bot.
/path/to/your/signal-cli -a +15555555555 send -m "hi :)" +18005550100
- You can send this message with
-
Run with
npm run start
- Sigbot currently has no knowledge of previous messages.
- I recommend running this inside
screenso that you can keep it running in the background easily.