add a history command
This commit is contained in:
@@ -9,6 +9,7 @@ A Discord bot that stores long-term chat history using SQLite with RAG (Retrieva
|
||||
- [Text-to-Speech](#text-to-speech)
|
||||
- [Image Commands](#image-commands)
|
||||
- [Bot Conversations](#bot-conversations)
|
||||
- [Chat History](#chat-history)
|
||||
- [Features](#features)
|
||||
- [Setup](#setup)
|
||||
- [Prerequisites](#prerequisites)
|
||||
@@ -69,6 +70,12 @@ Once you create a custom bot, interact with it by prefixing your message with th
|
||||
| -------------------------------------- | ------------------------------------------- | ------------------------------------------------ |
|
||||
| `!talkforme <bot1> <bot2> <n> <topic>` | Have two bots discuss a topic for n replies | `!talkforme alfred jarvis 4 the meaning of life` |
|
||||
|
||||
### Chat History
|
||||
|
||||
| Command | Description | Example Usage |
|
||||
| --------------------- | ------------------------------------- | ----------------- |
|
||||
| `!history <bot_name>` | View the chat history of a custom bot | `!history alfred` |
|
||||
|
||||
## Features
|
||||
|
||||
- **Long-term chat history storage**: Persistent storage of all bot interactions in SQLite
|
||||
@@ -78,6 +85,7 @@ Once you create a custom bot, interact with it by prefixing your message with th
|
||||
- **Image generation**: Generate images from text prompts via OpenAI-compatible API
|
||||
- **Image editing**: Edit uploaded images with text instructions
|
||||
- **Bot conversations**: Two custom bots can discuss a topic autonomously
|
||||
- **Chat history**: View the full conversation history of any custom bot with `!history`
|
||||
- **Automatic message cleanup**: Configurable limits on stored messages
|
||||
|
||||
## Setup
|
||||
@@ -158,7 +166,7 @@ uv run python -m vibe_bot.main
|
||||
The system uses SQLite with three tables:
|
||||
|
||||
1. **chat_messages**: Stores message metadata
|
||||
- `message_id`, `user_id`, `username`, `content`, `timestamp`, `channel_id`, `guild_id`
|
||||
- `message_id`, `user_id`, `username`, `content`, `bot_name`, `timestamp`, `channel_id`, `guild_id`
|
||||
|
||||
2. **message_embeddings**: Stores vector embeddings for RAG
|
||||
- `message_id` (PK), `embedding` (binary blob of float32 values)
|
||||
|
||||
Reference in New Issue
Block a user