{ "info": { "name": "Game Generator API", "description": "API tạo game giáo dục từ văn bản", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [ { "name": "📊 Generate Multi", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"text\": \"Mặt Trời là ngôi sao ở trung tâm của Hệ Mặt Trời.\",\n \"enabled_game_ids\": [1, 2],\n \"max_items\": 3\n}" }, "url": { "raw": "http://localhost:8000/generate", "host": [ "localhost" ], "port": "8000", "path": [ "generate" ] }, "description": "Analyze + Generate nhiều games\n\nREQUEST:\n• text (required)\n• enabled_game_ids: [1,2,3] (optional)\n• max_items: 3 (optional)\n• min_score: 30 (optional)\n• run_validator: true (optional)\n\nRESPONSE:\n• games: [1, 2]\n• results: {1: [...], 2: [...]}" } }, { "name": "🎯 Generate Single Best", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"text\": \"Python là ngôn ngữ lập trình phổ biến.\",\n \"max_items\": 3\n}" }, "url": { "raw": "http://localhost:8000/generate/single", "host": [ "localhost" ], "port": "8000", "path": [ "generate", "single" ] }, "description": "1 API call = Analyze + Generate 1 game tốt nhất\n\nRESPONSE:\n• type_id: 1\n• reason: \"...\"\n• items: [...]" } }, { "name": "🎮 Direct Quiz (type_id=1)", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"text\": \"Question: Thủ đô Việt Nam?\\nA. Hà Nội\\nB. TP HCM\\nC. Đà Nẵng\\nD. Huế\\nCorrect: A\",\n \"max_items\": 5\n}" }, "url": { "raw": "http://localhost:8000/generate/1", "host": [ "localhost" ], "port": "8000", "path": [ "generate", "1" ] }, "description": "Generate Quiz trực tiếp\n\nINPUT FORMAT:\nQuestion: ...\nA. ...\nB. ...\nC. ...\nD. ...\nCorrect: A" } }, { "name": "🎮 Direct Sentence (type_id=2)", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"text\": \"Mặt trời mọc; Chim hót; Người thức dậy\",\n \"max_items\": 10\n}" }, "url": { "raw": "http://localhost:8000/generate/2", "host": [ "localhost" ], "port": "8000", "path": [ "generate", "2" ] }, "description": "Generate Arrange Sentences trực tiếp\n\nINPUT FORMAT:\nsentence1; sentence2; sentence3" } }, { "name": "🎮 Direct Word (type_id=3)", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"text\": \"Apple; Banana; Orange; Grape\",\n \"max_items\": 10\n}" }, "url": { "raw": "http://localhost:8000/generate/3", "host": [ "localhost" ], "port": "8000", "path": [ "generate", "3" ] }, "description": "Generate Arrange Words trực tiếp\n\nINPUT FORMAT:\nword1; word2; word3" } }, { "name": "📋 List Games", "request": { "method": "GET", "url": { "raw": "http://localhost:8000/games", "host": [ "localhost" ], "port": "8000", "path": [ "games" ] }, "description": "Danh sách games\n\nRESPONSE:\n[\n {type_id: 1, game_type: \"quiz\", ...},\n {type_id: 2, ...},\n {type_id: 3, ...}\n]" } }, { "name": "⚙️ Get LLM", "request": { "method": "GET", "url": { "raw": "http://localhost:8000/llm", "host": [ "localhost" ], "port": "8000", "path": [ "llm" ] } } }, { "name": "⚙️ Set LLM - Gemini", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"provider\": \"gemini\",\n \"model_name\": \"gemini-2.0-flash-lite\"\n}" }, "url": { "raw": "http://localhost:8000/llm", "host": [ "localhost" ], "port": "8000", "path": [ "llm" ] } } }, { "name": "⚙️ Set LLM - Ollama", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"provider\": \"ollama\",\n \"model_name\": \"qwen2.5:14b\",\n \"base_url\": \"http://localhost:11434\"\n}" }, "url": { "raw": "http://localhost:8000/llm", "host": [ "localhost" ], "port": "8000", "path": [ "llm" ] } } }, { "name": "🔄 Reload Games", "request": { "method": "POST", "url": { "raw": "http://localhost:8000/reload", "host": [ "localhost" ], "port": "8000", "path": [ "reload" ] } } }, { "name": "❤️ Health", "request": { "method": "GET", "url": { "raw": "http://localhost:8000/health", "host": [ "localhost" ], "port": "8000", "path": [ "health" ] } } } ] }