Documentation
¶
Overview ¶
Command bot that demonstrates a multi-command handler pattern.
Supported commands:
!help - Show available commands !ping - Respond with "pong" (latency check) !time - Show current server time !ai <prompt> - Generate AI response using Ollama (if configured) !code <prompt> - Generate code and extract code blocks
Set environment variables before running:
export MATRIX_API_URL="https://matrix.example.com" export MATRIX_API_USER="botuser" export MATRIX_API_PASS="botpassword" export OPEN_WEB_API_GENERATE_URL="http://localhost:11434/api/generate" # optional export OPEN_WEB_API_TOKEN="your-ollama-token" # optional go run ./examples/commandbot/
Click to show internal directories.
Click to hide internal directories.