Matt Freeman 1801a9dcb8 licensing
2024-06-29 19:05:48 -04:00

1.3 KiB

Ollama Slixmpp Bot with OMEMO

A basic echo-bot built with slixmpp and slixmpp-omemo that relays your messages to a locally running ollama server.

Dependancies

Installation

git clone --bare https://github.com/user/repo_name
cd repo_name; git worktree add main; cd main
python -m venv .venv; ./.venv/bin/activate
pip install -r requirements.txt
# There is a httpx dependancy conflict. These must be installed in this order.
pip install ollama; pip install ollama-python

Usage

First Terminal instance

ollama serve

Second Terminal instance

./ollama_slixmpp_omemo_bot/src/ollama_slixmpp_omemo_bot/ $ PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python python main.py
# Enter JID: service-account@example-server.im
# Enter Password: 

With OMEMO and Blind Trust enabled, message service-account@example-server.im from another account.

Recommended and tested clients:

  • Conversations
  • Profanity

Development

Read the CONTRIBUTING.md file.

Credit

Slixmpp OMEMO plugin Copyright (C) 2010 Nathanael C. Fritz Copyright (C) 2019 Maxime “pep” Buquet pep@bouah.net