Spaces:
Running
Running
File size: 5,995 Bytes
39028c9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | {
"info": {
"name": "Intent-Aware Context-Preserving Summarization System - API Tests",
"description": "Essential API tests for document summarization with intent and context preservation",
"version": "1.0.0",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "✅ Health Check",
"request": {
"method": "GET",
"url": "http://localhost:8000/health"
},
"event": [
{
"listen": "test",
"script": {
"exec": ["pm.test('API is healthy', function() { pm.response.to.have.status(200); });"]
}
}
]
},
{
"name": "📚 Get Languages",
"request": {
"method": "GET",
"url": "http://localhost:8000/languages"
}
},
{
"name": "🎯 Get Intents",
"request": {
"method": "GET",
"url": "http://localhost:8000/intents"
}
},
{
"name": "📝 Test 1: Short Document",
"request": {
"method": "POST",
"header": [{"key": "Content-Type", "value": "application/json"}],
"body": {
"mode": "raw",
"raw": "{\"document\": \"Machine learning enables systems to learn from data.\", \"intent\": \"technical_overview\", \"language\": \"english\"}"
},
"url": "http://localhost:8000/summarize"
},
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test('Summary generated', function() {",
" pm.response.to.have.status(200);",
" var data = pm.response.json();",
" pm.expect(data.summary).to.exist;",
" console.log('Summary: ' + data.summary);",
"});"
]
}
}
]
},
{
"name": "📝 Test 2: Medium Document",
"request": {
"method": "POST",
"header": [{"key": "Content-Type", "value": "application/json"}],
"body": {
"mode": "raw",
"raw": "{\"document\": \"Deep learning is a subset of machine learning using neural networks with multiple layers. It has achieved state-of-the-art performance on computer vision, NLP, and speech recognition tasks.\", \"intent\": \"technical_overview\", \"language\": \"english\", \"quality_preference\": \"balanced\"}"
},
"url": "http://localhost:8000/summarize"
}
},
{
"name": "📝 Test 3: Long Document (RAG)",
"request": {
"method": "POST",
"header": [{"key": "Content-Type", "value": "application/json"}],
"body": {
"mode": "raw",
"raw": "{\"document\": \"Transformers have revolutionized NLP. The architecture uses self-attention mechanisms to compute representations. Each layer has multi-head self-attention and feed-forward networks. The encoder maps input to continuous representation while decoder generates output. BERT, GPT, and modern models use transformers. They achieve state-of-the-art results on machine translation, classification, QA, NER, and similarity tasks. Attention allows focusing on relevant parts. Self-attention learns dependencies regardless of distance. Position encoding injects relative position info. Layer normalization and residuals stabilize training. Transformers scale to billions of parameters like GPT-3. Pre-training on large corpora then fine-tuning is the dominant paradigm. Knowledge distillation creates efficient smaller versions.\", \"intent\": \"detailed_analysis\", \"language\": \"english\", \"quality_preference\": \"quality\"}"
},
"url": "http://localhost:8000/summarize"
}
},
{
"name": "📦 Test 4: Batch (3 docs)",
"request": {
"method": "POST",
"header": [{"key": "Content-Type", "value": "application/json"}],
"body": {
"mode": "raw",
"raw": "{\"documents\": [\"Machine learning is AI.\", \"Deep learning uses networks.\", \"NLP processes language.\"], \"intent\": \"technical_overview\"}"
},
"url": "http://localhost:8000/batch-summarize"
},
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test('Batch returns 3 summaries', function() {",
" pm.response.to.have.status(200);",
" var data = pm.response.json();",
" pm.expect(data.count).to.equal(3);",
"});"
]
}
}
]
},
{
"name": "🌐 Test 5: Spanish Language",
"request": {
"method": "POST",
"header": [{"key": "Content-Type", "value": "application/json"}],
"body": {
"mode": "raw",
"raw": "{\"document\": \"El aprendizaje automático es una rama de la inteligencia artificial. Permite que los sistemas aprendan de datos sin programación explícita.\", \"language\": \"spanish\", \"intent\": \"technical_overview\"}"
},
"url": "http://localhost:8000/summarize"
}
},
{
"name": "⚡ Test 6: Speed Mode",
"request": {
"method": "POST",
"header": [{"key": "Content-Type", "value": "application/json"}],
"body": {
"mode": "raw",
"raw": "{\"document\": \"AI is transforming technology.\", \"quality_preference\": \"speed\"}"
},
"url": "http://localhost:8000/summarize"
},
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test('Speed mode < 2s', function() {",
" pm.expect(pm.response.responseTime).to.be.below(2000);",
"});"
]
}
}
]
}
],
"variable": [
{
"key": "base_url",
"value": "http://localhost:8000",
"type": "string"
},
{
"key": "testDoc1",
"value": "",
"type": "string"
}
]
}
|