DawnPatrol provides a chatbot interface to messaging services such as Signal, Slack, WhatsApp and Telegram. It utilizes LLM's such as ChatGPT to provide a conversational capability to support a large variety of client inputs Special messages:
-
Admin messages:
@admin|add <name> <mobilenumber>
allows administrators to add new users to ecosystem This will be replaced by uploading .vcf file -
Location data: Upload a Google Maps format pin.
Two API-keys are required to bet set as environment variables in order to run the AI logic that's built into DawnPatrol:
HF_API_KEY
= a free key obtained from Hugging FaceOPENAI_TOKEN
= an OpenAI token for the charged API calls
Additionally, this project uses scala-cli as build tool.
Installing scala-cli on Linux:
curl -sSLf https://scala-cli.virtuslab.org/get | sh
or on Mac:
brew install Virtuslab/scala-cli/scala-cli
scala-cli run .
Once running, the application will poll the Signal API, obtaining messages for the configured phone number (signal-conf.signal-phone
in application.conf), and responding accordingly.
The messaging logic is defined in DawnPatrol and ConversationPollingHandler
The easiest way to build a docker container for DawnPatrol is to use the scala-cli
:
scala-cli --power \
package \
--docker . \
--docker-from eclipse-temurin:21 \
--docker-image-repository dawn-patrol
To run our Docker image:
docker run -it --rm \
-e HF_API_KEY='hf_key' \
-e OPENAI_TOKEN='oai_key' \
ghcr.io/didx-xyz/dawn-patrol
To organise imports, while in sbt run: scalafix OrganizeImports