MedicalAssisstantBot / postman_collection.json
SakibAhmed's picture
Upload postman_collection.json
8e41a82 verified
{
"info": {
"_postman_id": "a1b2c3d4-e5f6-a7b8-c9d0-e1f2a3b4c5d6",
"name": "NOW DentalBot API Collection",
"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.",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Chat Endpoints",
"description": "Endpoints for interacting with the chatbot.",
"item": [
{
"name": "/v1/chat/completions (Streaming)",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"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}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/v1/chat/completions",
"host": [
"{{baseUrl}}"
],
"path": [
"v1",
"chat",
"completions"
]
},
"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`."
},
"response": []
},
{
"name": "/v1/chat/completions (Non-Streaming)",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"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}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/v1/chat/completions",
"host": [
"{{baseUrl}}"
],
"path": [
"v1",
"chat",
"completions"
]
},
"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."
},
"response": []
},
{
"name": "/chat-bot (Legacy Endpoint)",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"query\": \"What is a root canal?\",\n \"session_id\": \"your-session-id-here\",\n \"user_id\": \"some-user-123\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/chat-bot",
"host": [
"{{baseUrl}}"
],
"path": [
"chat-bot"
]
},
"description": "The original, non-OpenAI-compatible chat endpoint. It takes a query, session_id, and optional user_id."
},
"response": []
}
]
},
{
"name": "Session Management",
"description": "Endpoints for managing user sessions.",
"item": [
{
"name": "/create-session",
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "{{baseUrl}}/create-session",
"host": [
"{{baseUrl}}"
],
"path": [
"create-session"
]
},
"description": "Creates a new, unique session ID required for tracking conversation history. Call this endpoint to start a new conversation."
},
"response": []
},
{
"name": "/clear-history",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"session_id\": \"your-session-id-here\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/clear-history",
"host": [
"{{baseUrl}}"
],
"path": [
"clear-history"
]
},
"description": "Clears the chat history associated with a specific session ID from the server."
},
"response": []
}
]
},
{
"name": "Admin Endpoints",
"description": "Administrative endpoints for managing the RAG system and monitoring the application. These endpoints require Basic Authentication.",
"item": [
{
"name": "/admin/rebuild_faiss_index",
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "{{baseUrl}}/admin/rebuild_faiss_index",
"host": [
"{{baseUrl}}"
],
"path": [
"admin",
"rebuild_faiss_index"
]
},
"description": "Triggers a full rebuild of the FAISS vector index from the source documents. This can be a long-running process."
},
"response": []
},
{
"name": "/admin/faiss_rag_status",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/admin/faiss_rag_status",
"host": [
"{{baseUrl}}"
],
"path": [
"admin",
"faiss_rag_status"
]
},
"description": "Retrieves the current status of the FAISS RAG (Retrieval-Augmented Generation) system, including index information and processed files."
},
"response": []
},
{
"name": "/db/status",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/db/status",
"host": [
"{{baseUrl}}"
],
"path": [
"db",
"status"
]
},
"description": "Checks the status of the personal data CSV file monitor."
},
"response": []
},
{
"name": "/admin/download_qa_database",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/admin/download_qa_database",
"host": [
"{{baseUrl}}"
],
"path": [
"admin",
"download_qa_database"
]
},
"description": "Downloads all the loaded question-answer datasets (General, Personal, Greetings) as a single Excel file."
},
"response": []
},
{
"name": "/report",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/report",
"host": [
"{{baseUrl}}"
],
"path": [
"report"
]
},
"description": "Downloads the complete chat history log as a CSV file."
},
"response": []
}
],
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "admin",
"type": "string"
},
{
"key": "username",
"value": "admin",
"type": "string"
}
]
}
},
{
"name": "General",
"description": "General application endpoints.",
"item": [
{
"name": "/v1/models",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/v1/models",
"host": [
"{{baseUrl}}"
],
"path": [
"v1",
"models"
]
},
"description": "An OpenAI-compatible endpoint that lists the available models. In this application, it returns the custom bot model name."
},
"response": []
},
{
"name": "/version",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/version",
"host": [
"{{baseUrl}}"
],
"path": [
"version"
]
},
"description": "Returns the current version of the application."
},
"response": []
}
]
}
],
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "YGHDADUASDASDijuh7uyhj",
"type": "string"
}
]
},
"variable": [
{
"key": "baseUrl",
"value": "http://localhost:7860",
"type": "string",
"description": "The base URL of the running Flask application."
}
]
}