/discord_chroma_bot

This bot also utilizes the ChromaDB library for document storage and retrieval to help answer user question

Primary LanguagePython

discord_chroma_bot

This bot also utilizes the ChromaDB library for document storage and retrieval to help answer user questions. The main functions of the bot are: Create a new collection in ChromaDB. Add documents from a folder to a collection. Load an existing collection. Delete a collection. Launch the Hermes bot on Discord. The bot will respond to user messages on Discord only when it is mentioned in a message. When a question is received, the bot will query the ChromaDB collection for relevant information, use the GPT-3.5-turbo model to generate a response based on the question and retrieved information, and send the response back to the user. To run the code, you need to have the required packages installed, which include: discord openai chromadb dotenv Once the packages are installed, you can run the script, enter your choices in the command-line interface, and follow the prompts to create or load a collection, add documents, and launch the bot. Make sure you have set up the necessary environment variables (OPENAI_API_KEY and DISCORD_TOKEN) in a .env file or your environment.