forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ML] Add Streaming Inference spec (elastic#113812)
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
Showing
2 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: [] |
49 changes: 49 additions & 0 deletions
49
rest-api-spec/src/main/resources/rest-api-spec/api/inference.stream_inference.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} | ||
} |