|
100 | 100 | }
|
101 | 101 | }
|
102 | 102 | },
|
| 103 | + "/embed_all": { |
| 104 | + "post": { |
| 105 | + "tags": [ |
| 106 | + "Text Embeddings Inference" |
| 107 | + ], |
| 108 | + "summary": "Get all Embeddings without Pooling.", |
| 109 | + "description": "Get all Embeddings without Pooling.\nReturns a 424 status code if the model is not an embedding model.", |
| 110 | + "operationId": "embed_all", |
| 111 | + "requestBody": { |
| 112 | + "content": { |
| 113 | + "application/json": { |
| 114 | + "schema": { |
| 115 | + "$ref": "#/components/schemas/EmbedAllRequest" |
| 116 | + } |
| 117 | + } |
| 118 | + }, |
| 119 | + "required": true |
| 120 | + }, |
| 121 | + "responses": { |
| 122 | + "200": { |
| 123 | + "description": "Embeddings", |
| 124 | + "content": { |
| 125 | + "application/json": { |
| 126 | + "schema": { |
| 127 | + "$ref": "#/components/schemas/EmbedAllResponse" |
| 128 | + } |
| 129 | + } |
| 130 | + } |
| 131 | + }, |
| 132 | + "413": { |
| 133 | + "description": "Batch size error", |
| 134 | + "content": { |
| 135 | + "application/json": { |
| 136 | + "schema": { |
| 137 | + "$ref": "#/components/schemas/ErrorResponse" |
| 138 | + }, |
| 139 | + "example": { |
| 140 | + "error": "Batch size error", |
| 141 | + "error_type": "validation" |
| 142 | + } |
| 143 | + } |
| 144 | + } |
| 145 | + }, |
| 146 | + "422": { |
| 147 | + "description": "Tokenization error", |
| 148 | + "content": { |
| 149 | + "application/json": { |
| 150 | + "schema": { |
| 151 | + "$ref": "#/components/schemas/ErrorResponse" |
| 152 | + }, |
| 153 | + "example": { |
| 154 | + "error": "Tokenization error", |
| 155 | + "error_type": "tokenizer" |
| 156 | + } |
| 157 | + } |
| 158 | + } |
| 159 | + }, |
| 160 | + "424": { |
| 161 | + "description": "Embedding Error", |
| 162 | + "content": { |
| 163 | + "application/json": { |
| 164 | + "schema": { |
| 165 | + "$ref": "#/components/schemas/ErrorResponse" |
| 166 | + }, |
| 167 | + "example": { |
| 168 | + "error": "Inference failed", |
| 169 | + "error_type": "backend" |
| 170 | + } |
| 171 | + } |
| 172 | + } |
| 173 | + }, |
| 174 | + "429": { |
| 175 | + "description": "Model is overloaded", |
| 176 | + "content": { |
| 177 | + "application/json": { |
| 178 | + "schema": { |
| 179 | + "$ref": "#/components/schemas/ErrorResponse" |
| 180 | + }, |
| 181 | + "example": { |
| 182 | + "error": "Model is overloaded", |
| 183 | + "error_type": "overloaded" |
| 184 | + } |
| 185 | + } |
| 186 | + } |
| 187 | + } |
| 188 | + } |
| 189 | + } |
| 190 | + }, |
| 191 | + "/embed_sparse": { |
| 192 | + "post": { |
| 193 | + "tags": [ |
| 194 | + "Text Embeddings Inference" |
| 195 | + ], |
| 196 | + "summary": "Get Sparse Embeddings. Returns a 424 status code if the model is not an embedding model with SPLADE pooling.", |
| 197 | + "description": "Get Sparse Embeddings. Returns a 424 status code if the model is not an embedding model with SPLADE pooling.", |
| 198 | + "operationId": "embed_sparse", |
| 199 | + "requestBody": { |
| 200 | + "content": { |
| 201 | + "application/json": { |
| 202 | + "schema": { |
| 203 | + "$ref": "#/components/schemas/EmbedSparseRequest" |
| 204 | + } |
| 205 | + } |
| 206 | + }, |
| 207 | + "required": true |
| 208 | + }, |
| 209 | + "responses": { |
| 210 | + "200": { |
| 211 | + "description": "Embeddings", |
| 212 | + "content": { |
| 213 | + "application/json": { |
| 214 | + "schema": { |
| 215 | + "$ref": "#/components/schemas/EmbedSparseResponse" |
| 216 | + } |
| 217 | + } |
| 218 | + } |
| 219 | + }, |
| 220 | + "413": { |
| 221 | + "description": "Batch size error", |
| 222 | + "content": { |
| 223 | + "application/json": { |
| 224 | + "schema": { |
| 225 | + "$ref": "#/components/schemas/ErrorResponse" |
| 226 | + }, |
| 227 | + "example": { |
| 228 | + "error": "Batch size error", |
| 229 | + "error_type": "validation" |
| 230 | + } |
| 231 | + } |
| 232 | + } |
| 233 | + }, |
| 234 | + "422": { |
| 235 | + "description": "Tokenization error", |
| 236 | + "content": { |
| 237 | + "application/json": { |
| 238 | + "schema": { |
| 239 | + "$ref": "#/components/schemas/ErrorResponse" |
| 240 | + }, |
| 241 | + "example": { |
| 242 | + "error": "Tokenization error", |
| 243 | + "error_type": "tokenizer" |
| 244 | + } |
| 245 | + } |
| 246 | + } |
| 247 | + }, |
| 248 | + "424": { |
| 249 | + "description": "Embedding Error", |
| 250 | + "content": { |
| 251 | + "application/json": { |
| 252 | + "schema": { |
| 253 | + "$ref": "#/components/schemas/ErrorResponse" |
| 254 | + }, |
| 255 | + "example": { |
| 256 | + "error": "Inference failed", |
| 257 | + "error_type": "backend" |
| 258 | + } |
| 259 | + } |
| 260 | + } |
| 261 | + }, |
| 262 | + "429": { |
| 263 | + "description": "Model is overloaded", |
| 264 | + "content": { |
| 265 | + "application/json": { |
| 266 | + "schema": { |
| 267 | + "$ref": "#/components/schemas/ErrorResponse" |
| 268 | + }, |
| 269 | + "example": { |
| 270 | + "error": "Model is overloaded", |
| 271 | + "error_type": "overloaded" |
| 272 | + } |
| 273 | + } |
| 274 | + } |
| 275 | + } |
| 276 | + } |
| 277 | + } |
| 278 | + }, |
103 | 279 | "/embeddings": {
|
104 | 280 | "post": {
|
105 | 281 | "tags": [
|
|
514 | 690 | }
|
515 | 691 | }
|
516 | 692 | },
|
| 693 | + "EmbedAllRequest": { |
| 694 | + "type": "object", |
| 695 | + "required": [ |
| 696 | + "inputs" |
| 697 | + ], |
| 698 | + "properties": { |
| 699 | + "inputs": { |
| 700 | + "$ref": "#/components/schemas/Input" |
| 701 | + }, |
| 702 | + "truncate": { |
| 703 | + "type": "boolean", |
| 704 | + "default": "false", |
| 705 | + "example": "false" |
| 706 | + } |
| 707 | + } |
| 708 | + }, |
| 709 | + "EmbedAllResponse": { |
| 710 | + "type": "array", |
| 711 | + "items": { |
| 712 | + "type": "array", |
| 713 | + "items": { |
| 714 | + "type": "array", |
| 715 | + "items": { |
| 716 | + "type": "number", |
| 717 | + "format": "float" |
| 718 | + } |
| 719 | + } |
| 720 | + }, |
| 721 | + "example": [ |
| 722 | + [ |
| 723 | + [ |
| 724 | + 0.0, |
| 725 | + 1.0, |
| 726 | + 2.0 |
| 727 | + ] |
| 728 | + ] |
| 729 | + ] |
| 730 | + }, |
517 | 731 | "EmbedRequest": {
|
518 | 732 | "type": "object",
|
519 | 733 | "required": [
|
|
552 | 766 | ]
|
553 | 767 | ]
|
554 | 768 | },
|
| 769 | + "EmbedSparseRequest": { |
| 770 | + "type": "object", |
| 771 | + "required": [ |
| 772 | + "inputs" |
| 773 | + ], |
| 774 | + "properties": { |
| 775 | + "inputs": { |
| 776 | + "$ref": "#/components/schemas/Input" |
| 777 | + }, |
| 778 | + "truncate": { |
| 779 | + "type": "boolean", |
| 780 | + "default": "false", |
| 781 | + "example": "false" |
| 782 | + } |
| 783 | + } |
| 784 | + }, |
| 785 | + "EmbedSparseResponse": { |
| 786 | + "type": "array", |
| 787 | + "items": { |
| 788 | + "type": "array", |
| 789 | + "items": { |
| 790 | + "$ref": "#/components/schemas/SparseValue" |
| 791 | + } |
| 792 | + } |
| 793 | + }, |
555 | 794 | "EmbeddingModel": {
|
556 | 795 | "type": "object",
|
557 | 796 | "required": [
|
|
1047 | 1286 | }
|
1048 | 1287 | }
|
1049 | 1288 | },
|
| 1289 | + "SparseValue": { |
| 1290 | + "type": "object", |
| 1291 | + "required": [ |
| 1292 | + "index", |
| 1293 | + "value" |
| 1294 | + ], |
| 1295 | + "properties": { |
| 1296 | + "index": { |
| 1297 | + "type": "integer", |
| 1298 | + "minimum": 0 |
| 1299 | + }, |
| 1300 | + "value": { |
| 1301 | + "type": "number", |
| 1302 | + "format": "float" |
| 1303 | + } |
| 1304 | + } |
| 1305 | + }, |
1050 | 1306 | "TokenizeRequest": {
|
1051 | 1307 | "type": "object",
|
1052 | 1308 | "required": [
|
|
0 commit comments