소스 검색

Add rest-api-spec for unified inference API (#120447) (#120524)

Quentin Pradet 9 달 전
부모
커밋
a9565847f2
1개의 변경된 파일45개의 추가작업 그리고 0개의 파일을 삭제
  1. 45 0
      rest-api-spec/src/main/resources/rest-api-spec/api/inference.unified_inference.json

+ 45 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/inference.unified_inference.json

@@ -0,0 +1,45 @@
+{
+  "inference.unified_inference": {
+    "documentation": {
+      "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/unified-inference-api.html",
+      "description": "Perform inference using the Unified Schema"
+    },
+    "stability": "stable",
+    "visibility": "public",
+    "headers": {
+      "accept": ["text/event-stream"],
+      "content_type": ["application/json"]
+    },
+    "url": {
+      "paths": [
+        {
+          "path": "/_inference/{inference_id}/_unified",
+          "methods": ["POST"],
+          "parts": {
+            "inference_id": {
+              "type": "string",
+              "description": "The inference Id"
+            }
+          }
+        },
+        {
+          "path": "/_inference/{task_type}/{inference_id}/_unified",
+          "methods": ["POST"],
+          "parts": {
+            "task_type": {
+              "type": "string",
+              "description": "The task type"
+            },
+            "inference_id": {
+              "type": "string",
+              "description": "The inference Id"
+            }
+          }
+        }
+      ]
+    },
+    "body": {
+      "description": "The inference payload"
+    }
+  }
+}