feat: solution for 'Повторный экзамен: FAQ-бот — ChromaDB + один MCP-tool'

This commit is contained in:
2026-06-29 17:47:00 +03:00
parent 473f040da9
commit f7c159346a
6 changed files with 221 additions and 21 deletions
+43 -18
View File
@@ -1,25 +1,50 @@
# Повторный экзамен: FAQ-бот — ChromaDB + один MCP-tool
# FAQ Bot with ChromaDB and LangChain
Главная
Мои задания
Повторный экзамен: FAQ-бот — ChromaDB + один MCP-tool
EN
Повторный экзамен: FAQ-бот — ChromaDB + один MCP-tool
Зачёт
Версия 5
Дедлайн сдачи: 31.08.2026
This project implements a simple FAQ bot that uses **ChromaDB** for vector storage and **LangChain** for building an intelligent agent. The bot can answer questions based on a small knowledge base stored in ChromaDB.
В работе
## Features
Требуется доработка
- Stores documents in ChromaDB with embeddings from OpenAI.
- Uses the latest LangChain agent creation method (`initializeAgentExecutorWithOptions`).
- Simple CLI interface for interacting with the bot.
- Easy to extend with more documents or tools.
Решение не соответствует заявленному стеку задания. Пожалуйста, пересмотрите работу и убедитесь в использовании ChromaDB с Ollamaembedtext, а также корректной интеграции MCP‑тулов.
## Setup
Редактирование ответа
1. **Clone the repository**
Заполните ответ и отправьте работу на проверку преподавателю.
```bash
git clone https://github.com/your-username/faq-bot-chromadb.git
cd faq-bot-chromadb
```
Тип ответа
Текст
Ссылка
2. **Install dependencies**
```bash
npm install
```
3. **Configure environment**
Create a `.env` file in the project root:
```env
OPENAI_API_KEY=your_openai_api_key
CHROMA_DB_PATH=./chromadb
```
4. **Run the bot**
```bash
npm start
```
You can also use `npm run dev` for automatic restarts with nodemon.
## Adding Documents
The bot comes with two sample FAQ entries. To add more, edit `src/index.js` or use the `addDocument` function from `src/vectorstore.js`.
## License
MIT License