-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Add back inference.inference API #126601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add back inference.inference API #126601
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| { | ||
| "inference.inference": { | ||
| "documentation": { | ||
| "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/post-inference-api.html", | ||
| "description": "Perform inference" | ||
| }, | ||
| "stability": "stable", | ||
| "visibility": "public", | ||
| "headers": { | ||
| "accept": ["application/json"], | ||
| "content_type": ["application/json"] | ||
| }, | ||
| "url": { | ||
| "paths": [ | ||
| { | ||
| "path": "/_inference/{inference_id}", | ||
| "methods": ["POST"], | ||
| "parts": { | ||
| "inference_id": { | ||
| "type": "string", | ||
| "description": "The inference Id" | ||
| } | ||
| } | ||
| }, | ||
| { | ||
| "path": "/_inference/{task_type}/{inference_id}", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you need this form as it is covered by There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I mainly wanted to include it for backward compatibility. It could prove helpful if a new task type is added to Elasticsearch but not added immediately in the specification, but a missing task type sounds much less likely than a missing provider. We could deprecate this form. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
True, let's leave it in for now if it becomes problematic it can be removed without breaking any existing usage as the |
||
| "methods": ["POST"], | ||
| "parts": { | ||
| "task_type": { | ||
| "type": "string", | ||
| "description": "The task type" | ||
| }, | ||
| "inference_id": { | ||
| "type": "string", | ||
| "description": "The inference Id" | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| }, | ||
| "body": { | ||
| "description": "The inference payload" | ||
| } | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think in most places we're directing users to include the
task_typein the URL. Would it cause problems if we remove this path?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allowing to call the Inference API without a task type is how Kibana deploys a model. Enforcing the task type apparently makes things more complex here.