35 lines
1.5 KiB
Markdown
35 lines
1.5 KiB
Markdown
# RAFAEL
|
|
|
|
Personal assistant bot
|
|
|
|
|
|
Rafael Environment Variables
|
|
Rafael uses environment variables to customize its behavior. This document describes how to use them and what they do.
|
|
|
|
|
|
## Installing
|
|
|
|
Nvidia support
|
|
|
|
run `CMAKE_ARGS="-DLLAMA_CUBLAS=ON -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc" pip install llama-cpp-python --force-reinstall --no-cache-dir`
|
|
|
|
## Configuration
|
|
|
|
### TELEGRAM_API_KEY
|
|
This variable should contain your bot's API key, which is necessary for Rafael to function properly. You can obtain an API key by creating a new bot on the [Telegram Bot API website](https://core.telegram.org/bash). Once you have created and registered your bot, you'll receive an API key that looks like this: `123456789:ABC-DEF1234567-GHIJKLMNOPQRSTUVWXYZ`.
|
|
|
|
For example, to set the TELEGRAM_API_KEY environment variable on a Linux machine using Bash, you would run:
|
|
|
|
`export TELEGRAM_API_KEY="123456789:ABC-DEF1234567-GHIJKLMNOPQRSTUVWXYZ"`
|
|
|
|
### RAFAEL_WEBHOOK_EXTERNAL_URL
|
|
This variable should contain the URL for your webhook. If you're using ngrok, you can obtain a temporary URL by running `ngrok http 3000` (assuming you have Rafael running on port 3000). The output will look something like this:
|
|
|
|
```
|
|
Forwarding https://56c87a2.ngrok.io
|
|
Forwarding http://56c87a2.ngrok.io
|
|
```
|
|
|
|
In this case, you would set RAFAEL_WEBHOOK_EXTERNAL_URL to `https://56c87a2.ngrok.io`. Note that the URL will change every time you run ngrok.
|
|
|
|
`export RAFAEL_WEBHOOK_EXTERNAL_URL=https://56c87a2.ngrok.io` |