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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"info": {
|
| 3 |
+
"_postman_id": "a1b2c3d4-e5f6-a7b8-c9d0-e1f2a3b4c5d6",
|
| 4 |
+
"name": "NOW DentalBot API Collection",
|
| 5 |
+
"description": "A comprehensive Postman collection for interacting with the Dental Assistant Chatbot API, based on the provided Python application files. It includes endpoints for chat, admin, and session management.",
|
| 6 |
+
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
|
| 7 |
+
},
|
| 8 |
+
"item": [
|
| 9 |
+
{
|
| 10 |
+
"name": "Chat Endpoints",
|
| 11 |
+
"description": "Endpoints for interacting with the chatbot.",
|
| 12 |
+
"item": [
|
| 13 |
+
{
|
| 14 |
+
"name": "/v1/chat/completions (Streaming)",
|
| 15 |
+
"request": {
|
| 16 |
+
"method": "POST",
|
| 17 |
+
"header": [
|
| 18 |
+
{
|
| 19 |
+
"key": "Content-Type",
|
| 20 |
+
"value": "application/json"
|
| 21 |
+
}
|
| 22 |
+
],
|
| 23 |
+
"body": {
|
| 24 |
+
"mode": "raw",
|
| 25 |
+
"raw": "{\n \"model\": \"MedicalAssisstantBot/v1\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"What are the common treatments for gingivitis?\"\n }\n ],\n \"stream\": true,\n \"conversation_id\": \"your-session-id-here\"\n}",
|
| 26 |
+
"options": {
|
| 27 |
+
"raw": {
|
| 28 |
+
"language": "json"
|
| 29 |
+
}
|
| 30 |
+
}
|
| 31 |
+
},
|
| 32 |
+
"url": {
|
| 33 |
+
"raw": "{{baseUrl}}/v1/chat/completions",
|
| 34 |
+
"host": [
|
| 35 |
+
"{{baseUrl}}"
|
| 36 |
+
],
|
| 37 |
+
"path": [
|
| 38 |
+
"v1",
|
| 39 |
+
"chat",
|
| 40 |
+
"completions"
|
| 41 |
+
]
|
| 42 |
+
},
|
| 43 |
+
"description": "This endpoint provides an OpenAI-compatible interface for chatting with the bot. Setting `\"stream\": true` will return a response as a server-sent event stream. Make sure to provide a `conversation_id` obtained from `/create-session`."
|
| 44 |
+
},
|
| 45 |
+
"response": []
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"name": "/v1/chat/completions (Non-Streaming)",
|
| 49 |
+
"request": {
|
| 50 |
+
"method": "POST",
|
| 51 |
+
"header": [
|
| 52 |
+
{
|
| 53 |
+
"key": "Content-Type",
|
| 54 |
+
"value": "application/json"
|
| 55 |
+
}
|
| 56 |
+
],
|
| 57 |
+
"body": {
|
| 58 |
+
"mode": "raw",
|
| 59 |
+
"raw": "{\n \"model\": \"MedicalAssisstantBot/v1\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Tell me about dental implants.\"\n }\n ],\n \"stream\": false,\n \"conversation_id\": \"your-session-id-here\",\n \"user_id\": \"some-user-123\"\n}",
|
| 60 |
+
"options": {
|
| 61 |
+
"raw": {
|
| 62 |
+
"language": "json"
|
| 63 |
+
}
|
| 64 |
+
}
|
| 65 |
+
},
|
| 66 |
+
"url": {
|
| 67 |
+
"raw": "{{baseUrl}}/v1/chat/completions",
|
| 68 |
+
"host": [
|
| 69 |
+
"{{baseUrl}}"
|
| 70 |
+
],
|
| 71 |
+
"path": [
|
| 72 |
+
"v1",
|
| 73 |
+
"chat",
|
| 74 |
+
"completions"
|
| 75 |
+
]
|
| 76 |
+
},
|
| 77 |
+
"description": "Sends a non-streaming request to the chat endpoint. It will return a complete JSON response. Providing a `user_id` allows the bot to access personalized information."
|
| 78 |
+
},
|
| 79 |
+
"response": []
|
| 80 |
+
},
|
| 81 |
+
{
|
| 82 |
+
"name": "/chat-bot (Legacy Endpoint)",
|
| 83 |
+
"request": {
|
| 84 |
+
"method": "POST",
|
| 85 |
+
"header": [
|
| 86 |
+
{
|
| 87 |
+
"key": "Content-Type",
|
| 88 |
+
"value": "application/json"
|
| 89 |
+
}
|
| 90 |
+
],
|
| 91 |
+
"body": {
|
| 92 |
+
"mode": "raw",
|
| 93 |
+
"raw": "{\n \"query\": \"What is a root canal?\",\n \"session_id\": \"your-session-id-here\",\n \"user_id\": \"some-user-123\"\n}",
|
| 94 |
+
"options": {
|
| 95 |
+
"raw": {
|
| 96 |
+
"language": "json"
|
| 97 |
+
}
|
| 98 |
+
}
|
| 99 |
+
},
|
| 100 |
+
"url": {
|
| 101 |
+
"raw": "{{baseUrl}}/chat-bot",
|
| 102 |
+
"host": [
|
| 103 |
+
"{{baseUrl}}"
|
| 104 |
+
],
|
| 105 |
+
"path": [
|
| 106 |
+
"chat-bot"
|
| 107 |
+
]
|
| 108 |
+
},
|
| 109 |
+
"description": "The original, non-OpenAI-compatible chat endpoint. It takes a query, session_id, and optional user_id."
|
| 110 |
+
},
|
| 111 |
+
"response": []
|
| 112 |
+
}
|
| 113 |
+
]
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"name": "Session Management",
|
| 117 |
+
"description": "Endpoints for managing user sessions.",
|
| 118 |
+
"item": [
|
| 119 |
+
{
|
| 120 |
+
"name": "/create-session",
|
| 121 |
+
"request": {
|
| 122 |
+
"method": "POST",
|
| 123 |
+
"header": [],
|
| 124 |
+
"url": {
|
| 125 |
+
"raw": "{{baseUrl}}/create-session",
|
| 126 |
+
"host": [
|
| 127 |
+
"{{baseUrl}}"
|
| 128 |
+
],
|
| 129 |
+
"path": [
|
| 130 |
+
"create-session"
|
| 131 |
+
]
|
| 132 |
+
},
|
| 133 |
+
"description": "Creates a new, unique session ID required for tracking conversation history. Call this endpoint to start a new conversation."
|
| 134 |
+
},
|
| 135 |
+
"response": []
|
| 136 |
+
},
|
| 137 |
+
{
|
| 138 |
+
"name": "/clear-history",
|
| 139 |
+
"request": {
|
| 140 |
+
"method": "POST",
|
| 141 |
+
"header": [
|
| 142 |
+
{
|
| 143 |
+
"key": "Content-Type",
|
| 144 |
+
"value": "application/json"
|
| 145 |
+
}
|
| 146 |
+
],
|
| 147 |
+
"body": {
|
| 148 |
+
"mode": "raw",
|
| 149 |
+
"raw": "{\n \"session_id\": \"your-session-id-here\"\n}",
|
| 150 |
+
"options": {
|
| 151 |
+
"raw": {
|
| 152 |
+
"language": "json"
|
| 153 |
+
}
|
| 154 |
+
}
|
| 155 |
+
},
|
| 156 |
+
"url": {
|
| 157 |
+
"raw": "{{baseUrl}}/clear-history",
|
| 158 |
+
"host": [
|
| 159 |
+
"{{baseUrl}}"
|
| 160 |
+
],
|
| 161 |
+
"path": [
|
| 162 |
+
"clear-history"
|
| 163 |
+
]
|
| 164 |
+
},
|
| 165 |
+
"description": "Clears the chat history associated with a specific session ID from the server."
|
| 166 |
+
},
|
| 167 |
+
"response": []
|
| 168 |
+
}
|
| 169 |
+
]
|
| 170 |
+
},
|
| 171 |
+
{
|
| 172 |
+
"name": "Admin Endpoints",
|
| 173 |
+
"description": "Administrative endpoints for managing the RAG system and monitoring the application. These endpoints require Basic Authentication.",
|
| 174 |
+
"item": [
|
| 175 |
+
{
|
| 176 |
+
"name": "/admin/rebuild_faiss_index",
|
| 177 |
+
"request": {
|
| 178 |
+
"method": "POST",
|
| 179 |
+
"header": [],
|
| 180 |
+
"url": {
|
| 181 |
+
"raw": "{{baseUrl}}/admin/rebuild_faiss_index",
|
| 182 |
+
"host": [
|
| 183 |
+
"{{baseUrl}}"
|
| 184 |
+
],
|
| 185 |
+
"path": [
|
| 186 |
+
"admin",
|
| 187 |
+
"rebuild_faiss_index"
|
| 188 |
+
]
|
| 189 |
+
},
|
| 190 |
+
"description": "Triggers a full rebuild of the FAISS vector index from the source documents. This can be a long-running process."
|
| 191 |
+
},
|
| 192 |
+
"response": []
|
| 193 |
+
},
|
| 194 |
+
{
|
| 195 |
+
"name": "/admin/faiss_rag_status",
|
| 196 |
+
"request": {
|
| 197 |
+
"method": "GET",
|
| 198 |
+
"header": [],
|
| 199 |
+
"url": {
|
| 200 |
+
"raw": "{{baseUrl}}/admin/faiss_rag_status",
|
| 201 |
+
"host": [
|
| 202 |
+
"{{baseUrl}}"
|
| 203 |
+
],
|
| 204 |
+
"path": [
|
| 205 |
+
"admin",
|
| 206 |
+
"faiss_rag_status"
|
| 207 |
+
]
|
| 208 |
+
},
|
| 209 |
+
"description": "Retrieves the current status of the FAISS RAG (Retrieval-Augmented Generation) system, including index information and processed files."
|
| 210 |
+
},
|
| 211 |
+
"response": []
|
| 212 |
+
},
|
| 213 |
+
{
|
| 214 |
+
"name": "/db/status",
|
| 215 |
+
"request": {
|
| 216 |
+
"method": "GET",
|
| 217 |
+
"header": [],
|
| 218 |
+
"url": {
|
| 219 |
+
"raw": "{{baseUrl}}/db/status",
|
| 220 |
+
"host": [
|
| 221 |
+
"{{baseUrl}}"
|
| 222 |
+
],
|
| 223 |
+
"path": [
|
| 224 |
+
"db",
|
| 225 |
+
"status"
|
| 226 |
+
]
|
| 227 |
+
},
|
| 228 |
+
"description": "Checks the status of the personal data CSV file monitor."
|
| 229 |
+
},
|
| 230 |
+
"response": []
|
| 231 |
+
},
|
| 232 |
+
{
|
| 233 |
+
"name": "/admin/download_qa_database",
|
| 234 |
+
"request": {
|
| 235 |
+
"method": "GET",
|
| 236 |
+
"header": [],
|
| 237 |
+
"url": {
|
| 238 |
+
"raw": "{{baseUrl}}/admin/download_qa_database",
|
| 239 |
+
"host": [
|
| 240 |
+
"{{baseUrl}}"
|
| 241 |
+
],
|
| 242 |
+
"path": [
|
| 243 |
+
"admin",
|
| 244 |
+
"download_qa_database"
|
| 245 |
+
]
|
| 246 |
+
},
|
| 247 |
+
"description": "Downloads all the loaded question-answer datasets (General, Personal, Greetings) as a single Excel file."
|
| 248 |
+
},
|
| 249 |
+
"response": []
|
| 250 |
+
},
|
| 251 |
+
{
|
| 252 |
+
"name": "/report",
|
| 253 |
+
"request": {
|
| 254 |
+
"method": "GET",
|
| 255 |
+
"header": [],
|
| 256 |
+
"url": {
|
| 257 |
+
"raw": "{{baseUrl}}/report",
|
| 258 |
+
"host": [
|
| 259 |
+
"{{baseUrl}}"
|
| 260 |
+
],
|
| 261 |
+
"path": [
|
| 262 |
+
"report"
|
| 263 |
+
]
|
| 264 |
+
},
|
| 265 |
+
"description": "Downloads the complete chat history log as a CSV file."
|
| 266 |
+
},
|
| 267 |
+
"response": []
|
| 268 |
+
}
|
| 269 |
+
],
|
| 270 |
+
"auth": {
|
| 271 |
+
"type": "basic",
|
| 272 |
+
"basic": [
|
| 273 |
+
{
|
| 274 |
+
"key": "password",
|
| 275 |
+
"value": "admin",
|
| 276 |
+
"type": "string"
|
| 277 |
+
},
|
| 278 |
+
{
|
| 279 |
+
"key": "username",
|
| 280 |
+
"value": "admin",
|
| 281 |
+
"type": "string"
|
| 282 |
+
}
|
| 283 |
+
]
|
| 284 |
+
}
|
| 285 |
+
},
|
| 286 |
+
{
|
| 287 |
+
"name": "General",
|
| 288 |
+
"description": "General application endpoints.",
|
| 289 |
+
"item": [
|
| 290 |
+
{
|
| 291 |
+
"name": "/v1/models",
|
| 292 |
+
"request": {
|
| 293 |
+
"method": "GET",
|
| 294 |
+
"header": [],
|
| 295 |
+
"url": {
|
| 296 |
+
"raw": "{{baseUrl}}/v1/models",
|
| 297 |
+
"host": [
|
| 298 |
+
"{{baseUrl}}"
|
| 299 |
+
],
|
| 300 |
+
"path": [
|
| 301 |
+
"v1",
|
| 302 |
+
"models"
|
| 303 |
+
]
|
| 304 |
+
},
|
| 305 |
+
"description": "An OpenAI-compatible endpoint that lists the available models. In this application, it returns the custom bot model name."
|
| 306 |
+
},
|
| 307 |
+
"response": []
|
| 308 |
+
},
|
| 309 |
+
{
|
| 310 |
+
"name": "/version",
|
| 311 |
+
"request": {
|
| 312 |
+
"method": "GET",
|
| 313 |
+
"header": [],
|
| 314 |
+
"url": {
|
| 315 |
+
"raw": "{{baseUrl}}/version",
|
| 316 |
+
"host": [
|
| 317 |
+
"{{baseUrl}}"
|
| 318 |
+
],
|
| 319 |
+
"path": [
|
| 320 |
+
"version"
|
| 321 |
+
]
|
| 322 |
+
},
|
| 323 |
+
"description": "Returns the current version of the application."
|
| 324 |
+
},
|
| 325 |
+
"response": []
|
| 326 |
+
}
|
| 327 |
+
]
|
| 328 |
+
}
|
| 329 |
+
],
|
| 330 |
+
"auth": {
|
| 331 |
+
"type": "bearer",
|
| 332 |
+
"bearer": [
|
| 333 |
+
{
|
| 334 |
+
"key": "token",
|
| 335 |
+
"value": "YGHDADUASDASDijuh7uyhj",
|
| 336 |
+
"type": "string"
|
| 337 |
+
}
|
| 338 |
+
]
|
| 339 |
+
},
|
| 340 |
+
"variable": [
|
| 341 |
+
{
|
| 342 |
+
"key": "baseUrl",
|
| 343 |
+
"value": "http://localhost:7860",
|
| 344 |
+
"type": "string",
|
| 345 |
+
"description": "The base URL of the running Flask application."
|
| 346 |
+
}
|
| 347 |
+
]
|
| 348 |
+
}
|