27
27
- [ Key Features] ( #key-features )
28
28
- [ Tech Stack] ( #technology-stack )
29
29
- [ Installation and Setup] ( #installation-setup )
30
+ - [ Using Docker] ( #docker-setup )
31
+ - [ Manual Installation] ( #manual-setup )
30
32
- [ Usage] ( #usage )
31
33
- [ Contributions] ( #contributions )
32
34
- [ License] ( #license )
@@ -161,6 +163,85 @@ If you like what you see and would want to support the project's developer, you
161
163
162
164
## 🚀 Installation & Setup <a name =" installation-setup " ></a >
163
165
166
+ ## 📌 Option 1: Using Docker <a name =" docker-setup " ></a >
167
+
168
+ ### 1️⃣ Clone the Repository
169
+ ``` bash
170
+ git clone https://github.com/souvikmajumder26/Multi-Agent-Medical-Assistant.git
171
+ cd Multi-Agent-Medical-Assistant
172
+ ```
173
+
174
+ ### 2️⃣ Set Up API Keys
175
+ - Create a ` .env ` file and add the following API keys:
176
+
177
+ > [ !NOTE]
178
+ > You may use any llm and embedding model of your choice...
179
+ > 1 . If using Azure OpenAI, no modification required.
180
+ > 2 . If using direct OpenAI, modify the llm and embedding model definitions in the 'config.py' and provide appropriate env variables.
181
+ > 3 . If using local models, appropriate code changes might be required throughout the codebase especially in 'agents'.
182
+
183
+ > [ !WARNING]
184
+ > If all necessary env variables are not provided, errors will be thrown in console.
185
+
186
+ ``` bash
187
+ # LLM Configuration (Azure Open AI - gpt-4o used in development)
188
+ # If using any other LLM API key or local LLM, appropriate code modification is required
189
+ deployment_name =
190
+ model_name = gpt-4o
191
+ azure_endpoint =
192
+ openai_api_key =
193
+ openai_api_version =
194
+
195
+ # Embedding Model Configuration (Azure Open AI - text-embedding-ada-002 used in development)
196
+ # If using any other embedding model, appropriate code modification is required
197
+ embedding_deployment_name =
198
+ embedding_model_name = text-embedding-ada-002
199
+ embedding_azure_endpoint =
200
+ embedding_openai_api_key =
201
+ embedding_openai_api_version =
202
+
203
+ # Speech API Key (Free credits available with new Eleven Labs Account)
204
+ ELEVEN_LABS_API_KEY =
205
+
206
+ # Web Search API Key (Free credits available with new Tavily Account)
207
+ TAVILY_API_KEY =
208
+
209
+ # Hugging Face Token - using reranker model "ms-marco-TinyBERT-L-6"
210
+ HUGGINGFACE_TOKEN =
211
+
212
+ # (OPTIONAL) If using Qdrant server version, local does not require API key
213
+ QDRANT_URL =
214
+ QDRANT_API_KEY =
215
+ ```
216
+
217
+ ### 3️⃣ Run with Docker Compose
218
+ ``` bash
219
+ docker-compose up -d
220
+ ```
221
+ This will start two services:
222
+
223
+ - fastapi-backend: Runs the FastAPI backend on port 8000
224
+ - main-app: Runs the main application (app.py)
225
+
226
+ ### 4️⃣ Ingest data into the Vector DB
227
+ ``` bash
228
+ # To ingest a single file
229
+ docker-compose run --rm fastapi-backend ingest --file ./data/raw/your_file.pdf
230
+
231
+ # To ingest all files in a directory
232
+ docker-compose run --rm fastapi-backend ingest --dir ./data/raw
233
+ ```
234
+
235
+ ### 5️⃣ Access the Application
236
+ The application will be available at: ` http://localhost:8000 `
237
+
238
+ ### 6️⃣ Stopping the Application
239
+ ``` bash
240
+ docker-compose down
241
+ ```
242
+
243
+ ## 📌 Option 2: Manual Installation <a name =" manual-setup " ></a >
244
+
164
245
### 1️⃣ Clone the Repository
165
246
``` bash
166
247
git clone https://github.com/souvikmajumder26/Multi-Agent-Medical-Assistant.git
@@ -233,53 +314,13 @@ winget install ffmpeg
233
314
``` bash
234
315
pip install -r requirements.txt
235
316
```
236
- - Might be required, might not be :
317
+ - Might be required:
237
318
``` bash
238
319
pip install unstructured[pdf]
239
320
```
240
321
241
322
### 4️⃣ Set Up API Keys
242
- - Create a ` .env ` file and add the following API keys:
243
-
244
- > [ !NOTE]
245
- > You may use any llm and embedding model of your choice...
246
- > 1 . If using Azure OpenAI, no modification required.
247
- > 2 . If using direct OpenAI, modify the llm and embedding model definitions in the 'config.py' and provide appropriate env variables.
248
- > 3 . If using local models, appropriate code changes might be required throughout the codebase especially in 'agents'.
249
-
250
- > [ !WARNING]
251
- > If all necessary env variables are not provided, errors will be thrown in console.
252
-
253
- ``` bash
254
- # LLM Configuration (Azure Open AI - gpt-4o used in development)
255
- # If using any other LLM API key or local LLM, appropriate code modification is required
256
- deployment_name =
257
- model_name = gpt-4o
258
- azure_endpoint =
259
- openai_api_key =
260
- openai_api_version =
261
-
262
- # Embedding Model Configuration (Azure Open AI - text-embedding-ada-002 used in development)
263
- # If using any other embedding model, appropriate code modification is required
264
- embedding_deployment_name =
265
- embedding_model_name = text-embedding-ada-002
266
- embedding_azure_endpoint =
267
- embedding_openai_api_key =
268
- embedding_openai_api_version =
269
-
270
- # Speech API Key (Free credits available with new Eleven Labs Account)
271
- ELEVEN_LABS_API_KEY =
272
-
273
- # Web Search API Key (Free credits available with new Tavily Account)
274
- TAVILY_API_KEY =
275
-
276
- # Hugging Face Token - using reranker model "ms-marco-TinyBERT-L-6"
277
- HUGGINGFACE_TOKEN =
278
-
279
- # (OPTIONAL) If using Qdrant server version, local does not require API key
280
- QDRANT_URL =
281
- QDRANT_API_KEY =
282
- ```
323
+ - Create a ` .env ` file and add the required API keys as shown in ` Option 1 ` .
283
324
284
325
### 5️⃣ Run the Application
285
326
- Run the following commands one after another in separate windows with same directorty and virtual environment. Keep both running simultanesouly.
@@ -303,6 +344,34 @@ python ingest_rag_data.py --dir ./data/raw
303
344
304
345
---
305
346
347
+ ## Docker Related Information:
348
+
349
+ ### Data Persistence
350
+
351
+ The vector database data is stored in Docker volumes:
352
+
353
+ - ` vector-db-processed ` : Contains data from the ` data/processed ` directory
354
+ - ` vector-db-qdrant ` : Contains data from the ` data/qdrantdb ` directory
355
+ - ` upload-data ` : Contains uploaded files in the ` uploads ` directory
356
+
357
+ This ensures your data persists even if you remove the containers.
358
+
359
+ ### Troubleshooting Docker Setup
360
+
361
+ - If the containers aren't starting properly, check logs:
362
+ ``` bash
363
+ docker-compose logs fastapi-backend
364
+ docker-compose logs main-app
365
+ ```
366
+ - Make sure all required environment variables are set in the ` .env ` file
367
+ - To completely clean up and restart:
368
+ ``` bash
369
+ docker-compose down -v
370
+ docker-compose up -d --build
371
+ ```
372
+
373
+ ---
374
+
306
375
## 🧠 Usage <a name =" usage " ></a >
307
376
308
377
> [ !NOTE]
0 commit comments