Skip to content

Commit 7753c52

Browse files
authored
[ML] Add Streaming Inference spec (#113812)
API for `/_inference/{task_type}/{inference_id}/_stream` and `/_inference/{inference_id}/_stream` Request is `application/json` Response is `text/event-stream`
1 parent e065a37 commit 7753c52

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

docs/changelog/113812.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 113812
2+
summary: Add Streaming Inference spec
3+
area: Machine Learning
4+
type: enhancement
5+
issues: []
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"inference.stream_inference":{
3+
"documentation":{
4+
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/post-stream-inference-api.html",
5+
"description":"Perform streaming inference"
6+
},
7+
"stability":"experimental",
8+
"visibility":"public",
9+
"headers":{
10+
"accept": [ "text/event-stream"],
11+
"content_type": ["application/json"]
12+
},
13+
"url":{
14+
"paths":[
15+
{
16+
"path":"/_inference/{inference_id}/_stream",
17+
"methods":[
18+
"POST"
19+
],
20+
"parts":{
21+
"inference_id":{
22+
"type":"string",
23+
"description":"The inference Id"
24+
}
25+
}
26+
},
27+
{
28+
"path":"/_inference/{task_type}/{inference_id}/_stream",
29+
"methods":[
30+
"POST"
31+
],
32+
"parts":{
33+
"task_type":{
34+
"type":"string",
35+
"description":"The task type"
36+
},
37+
"inference_id":{
38+
"type":"string",
39+
"description":"The inference Id"
40+
}
41+
}
42+
}
43+
]
44+
},
45+
"body":{
46+
"description":"The inference payload"
47+
}
48+
}
49+
}

0 commit comments

Comments
 (0)