Skip to content

didx-xyz/dawn-patrol

Repository files navigation

D@wn Patrol

dawn-patrol

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.

Prerequisites

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 Face
  • OPENAI_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

Running DawnPatrol

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

Docker

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

Scalafix

To organise imports, while in sbt run: scalafix OrganizeImports

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages