Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yyyasin19/discord-emb-search
https://github.com/yyyasin19/discord-emb-search
Last synced: 24 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/yyyasin19/discord-emb-search
- Owner: YYYasin19
- Created: 2024-01-13T13:26:33.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-01-14T22:34:17.000Z (10 months ago)
- Last Synced: 2024-04-13T04:21:22.068Z (7 months ago)
- Language: Python
- Size: 227 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Discord Embedding Search
Being somewhat dissatisfied with Discord's search functionality, I decided to make my own.
This is a simple Discord-Bot implemented in Python that will index messages using a `SentenceTransformer` embedding.## Usage
### Configuration
Configuratio requires setting up a Discord bot.
After that, set the `BOT_TOKEN` environment variable (e.g. in a local `.env` file).Finally, invite the bot to your server using the OAuth2 URL generated by the Discord Developer Portal.
You can also set which embeddings to use using the `HF_EMBEDDING_MODEL` environment variable, e.g. setting it to `deutsche-telekom/gbert-large-paraphrase-cosine` will use a German BERT model.
### with Docker
```bash
docker compose up -d --build
```### locally
```bash
# create environment with (micro)mamba/conda
micromamba env create -f environment.yml# activate environment
micromamba activate discord-bot# install package
pip install -e .# run bot
python -m discord-embed-bot
```:warning: Note that the first usage might take a few minutes, because the model needs to be downloaded.
The volume mapping in the `docker-compose.yml` file is set up to cache the huggingface models, though.