A tiny TypeScript prototype that turns a Slack support channel into a question‑answering bot for French rap lyrics. It embeds every thread with OpenAI, stores the vectors in Qdrant, then lets you chat with GPT‑4‑Turbo, retrieving the most relevant conversation snippet as context.
- Ingest Slack history (
lyrics_support_channel.json) and group messages by thread. - Generate 1 536‑dimensional embeddings with
text-embedding-3-small. - Persist embeddings in a local Qdrant collection (
lyrics_support_channel). - Lightweight CLI chatbot that performs hybrid search → context‑augmented GPT reply.
- Single‑command local deployment with Docker Compose.
.
├── docker-compose.yml # local vector database (Qdrant)
├── embedded-slack-channel.ts # data ingestion & indexing pipeline
├── index.ts # interactive chat loop
├── lyrics_support_channel.json # sample transcript used for the demo
├── package.json # dependencies & scripts
└── tsconfig.json # TypeScript config (implicit via ts‑node)
- Node.js ≥ 18
- Docker & Docker Compose
- An OpenAI API key
git clone <your‑fork‑url>
cd victor-siphon
npm installCreate a .env file at the project root (or export the vars manually):
OPENAI_API_KEY=sk-...
QDRANT_URL=http://localhost:6333 # or your cloud endpoint
QDRANT_API_KEY= # leave empty for local instance
QDRANT_PORT=6333docker compose up -d qdrantThe service exposes localhost:6333 by default.
npx ts-node embedded-slack-channel.tsThis will parse the JSON log, group threads, build embeddings and upsert them into Qdrant.
npx ts-node index.tsBienvenue dans le chatbot support des paroles de Vald ! Tape 'exit' pour quitter.
> Qu'est‑ce que Vald veut dire par « Dieu merci » ?
→ Réponse du bot : ...
Hit exit to leave.
docker compose down| What you want to change | Where to look |
|---|---|
| Collection name | embedded-slack-channel.ts & index.ts |
| Embedding model | embed() helper in both files |
| Source transcript | Replace lyrics_support_channel.json |
Retrieval limit / scoring distance |
index.ts → qdrant.search() |
| Chat model / system prompt | index.ts → openai.chat.completions.create() |
This project is released under the ISC License — see package.json for details.