Skip to content

Commit

Permalink
[ML] Add Streaming Inference spec (elastic#113812)
Browse files Browse the repository at this point in the history
API for `/_inference/{task_type}/{inference_id}/_stream` and `/_inference/{inference_id}/_stream`

Request is `application/json`
Response is `text/event-stream`
  • Loading branch information
prwhelan committed Oct 7, 2024
1 parent 46b0696 commit 5478f60
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/changelog/113812.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 113812
summary: Add Streaming Inference spec
area: Machine Learning
type: enhancement
issues: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"inference.stream_inference":{
"documentation":{
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/post-stream-inference-api.html",
"description":"Perform streaming inference"
},
"stability":"experimental",
"visibility":"public",
"headers":{
"accept": [ "text/event-stream"],
"content_type": ["application/json"]
},
"url":{
"paths":[
{
"path":"/_inference/{inference_id}/_stream",
"methods":[
"POST"
],
"parts":{
"inference_id":{
"type":"string",
"description":"The inference Id"
}
}
},
{
"path":"/_inference/{task_type}/{inference_id}/_stream",
"methods":[
"POST"
],
"parts":{
"task_type":{
"type":"string",
"description":"The task type"
},
"inference_id":{
"type":"string",
"description":"The inference Id"
}
}
}
]
},
"body":{
"description":"The inference payload"
}
}
}

0 comments on commit 5478f60

Please sign in to comment.