Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/odynvolk/jensen
A LLaMA 2 powered Telegram chatbot.
https://github.com/odynvolk/jensen
chatbot llama2 llamacpp llm telegram
Last synced: 2 months ago
JSON representation
A LLaMA 2 powered Telegram chatbot.
- Host: GitHub
- URL: https://github.com/odynvolk/jensen
- Owner: odynvolk
- License: mit
- Created: 2023-08-10T18:42:45.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-11T13:07:49.000Z (11 months ago)
- Last Synced: 2024-10-18T22:08:35.882Z (3 months ago)
- Topics: chatbot, llama2, llamacpp, llm, telegram
- Language: Python
- Homepage:
- Size: 18.6 KB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jensen
A LLaMA 2 powered Telegram bot.
## Prerequisites:
### Telegram bot
First you need to create a Telegram bot to interact with. See instructions [here](https://core.telegram.org/bots).
### LLaMA 2 model
You need a LLaMA 2 model in GGML format. You can find quite a few through [TheBloke on HuggingFace](https://huggingface.co/TheBloke)
who has done an enormous service to the community by converting different models to GGML and quantized them. Pick one that suits your
needs and hardware requirements.### Python
You need Python 3 on your machine.
- Miniconda (optional)
For handling the packages needed for different enivronments.
```bash
$ curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o Miniconda3-latest-MacOSX-arm64.sh
$ chmod +x Miniconda3-latest-MacOSX-arm64.sh
$ ./Miniconda3-latest-MacOSX-arm64.sh -b -p $HOME/miniconda
$ source ~/miniconda/bin/activate
```- LLaMA 2, Telegram etc
For using LLaMA 2 models, Telegram API etc
```bash
$ pip install -r requirements.txt
```## Configuration
Create a `.env` file with the following properties.
```
# LLM
MODEL_PATH= (mandatory)
MAX_TOKENS=
N_CTX=
N_GPU_LAYERS
N_THREADS=
USE_MLOCK=PROMPT_FORMAT=
# Telegram
API_KEY= (mandatory)
POLL_INTERVAL=
```## Usage
Start the application:
```bash
python ./jensen/app.py
```