Skip to content

[ML] Update inference api rest spec #124151

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"inference.chat_completion_unified": {
"documentation": {
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/chat-completion-inference.html",
"description": "Perform chat completion inference"
},
"stability": "stable",
"visibility": "public",
"headers": {
"accept": [
"text/event-stream"
],
"content_type": [
"application/json"
]
},
"url": {
"paths": [
{
"path": "/_inference/chat_completion/{inference_id}/_stream",
"methods": [
"POST"
],
"parts": {
"inference_id": {
"type": "string",
"description": "The inference Id"
}
}
}
]
},
"body": {
"description": "The inference payload"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"inference.completion": {
"documentation": {
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/post-inference-api.html",
"description": "Perform completion inference"
},
"stability": "stable",
"visibility": "public",
"headers": {
"accept": [
"application/json"
],
"content_type": [
"application/json"
]
},
"url": {
"paths": [
{
"path": "/_inference/completion/{inference_id}",
"methods": [
"POST"
],
"parts": {
"inference_id": {
"type": "string",
"description": "The inference Id"
}
}
}
]
},
"body": {
"description": "The inference payload"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,47 +1,49 @@
{
"inference.get":{
"documentation":{
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/get-inference-api.html",
"description":"Get an inference endpoint"
"inference.get": {
"documentation": {
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/get-inference-api.html",
"description": "Get an inference endpoint"
},
"stability":"stable",
"visibility":"public",
"headers":{
"accept": [ "application/json"]
"stability": "stable",
"visibility": "public",
"headers": {
"accept": [
"application/json"
]
},
"url":{
"paths":[
"url": {
"paths": [
{
"path":"/_inference",
"methods":[
"path": "/_inference",
"methods": [
"GET"
]
},
{
"path":"/_inference/{inference_id}",
"methods":[
"path": "/_inference/{inference_id}",
"methods": [
"GET"
],
"parts":{
"inference_id":{
"type":"string",
"description":"The inference Id"
"parts": {
"inference_id": {
"type": "string",
"description": "The inference Id"
}
}
},
{
"path":"/_inference/{task_type}/{inference_id}",
"methods":[
"path": "/_inference/{task_type}/{inference_id}",
"methods": [
"GET"
],
"parts":{
"task_type":{
"type":"string",
"description":"The task type"
"parts": {
"task_type": {
"type": "string",
"description": "The task type"
},
"inference_id":{
"type":"string",
"description":"The inference Id"
"inference_id": {
"type": "string",
"description": "The inference Id"
}
}
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,49 +1,53 @@
{
"inference.put":{
"documentation":{
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/put-inference-api.html",
"description":"Configure an inference endpoint for use in the Inference API"
"inference.put": {
"documentation": {
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/put-inference-api.html",
"description": "Configure an inference endpoint for use in the Inference API"
},
"stability":"stable",
"visibility":"public",
"headers":{
"accept": [ "application/json"],
"content_type": ["application/json"]
"stability": "stable",
"visibility": "public",
"headers": {
"accept": [
"application/json"
],
"content_type": [
"application/json"
]
},
"url":{
"paths":[
"url": {
"paths": [
{
"path":"/_inference/{inference_id}",
"methods":[
"path": "/_inference/{inference_id}",
"methods": [
"PUT"
],
"parts":{
"inference_id":{
"type":"string",
"description":"The inference Id"
"parts": {
"inference_id": {
"type": "string",
"description": "The inference Id"
}
}
},
{
"path":"/_inference/{task_type}/{inference_id}",
"methods":[
"path": "/_inference/{task_type}/{inference_id}",
"methods": [
"PUT"
],
"parts":{
"task_type":{
"type":"string",
"description":"The task type"
"parts": {
"task_type": {
"type": "string",
"description": "The task type"
},
"inference_id":{
"type":"string",
"description":"The inference Id"
"inference_id": {
"type": "string",
"description": "The inference Id"
}
}
}
]
},
"body":{
"description":"The inference endpoint's task and service settings"
"body": {
"description": "The inference endpoint's task and service settings"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"inference.rerank": {
"documentation": {
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/post-inference-api.html",
"description": "Perform reranking inference"
},
"stability": "stable",
"visibility": "public",
"headers": {
"accept": [
"application/json"
],
"content_type": [
"application/json"
]
},
"url": {
"paths": [
{
"path": "/_inference/rerank/{inference_id}",
"methods": [
"POST"
],
"parts": {
"inference_id": {
"type": "string",
"description": "The inference Id"
}
}
}
]
},
"body": {
"description": "The inference payload"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"inference.sparse_embedding": {
"documentation": {
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/post-inference-api.html",
"description": "Perform sparse embedding inference"
},
"stability": "stable",
"visibility": "public",
"headers": {
"accept": [
"application/json"
],
"content_type": [
"application/json"
]
},
"url": {
"paths": [
{
"path": "/_inference/sparse_embedding/{inference_id}",
"methods": [
"POST"
],
"parts": {
"inference_id": {
"type": "string",
"description": "The inference Id"
}
}
}
]
},
"body": {
"description": "The inference payload"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"inference.stream_completion": {
"documentation": {
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/post-stream-inference-api.html",
"description": "Perform streaming inference"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"description": "Perform streaming inference"
"description": "Perform streaming completion inference"

},
"stability": "stable",
"visibility": "public",
"headers": {
"accept": [
"text/event-stream"
],
"content_type": [
"application/json"
]
},
"url": {
"paths": [
{
"path": "/_inference/completion/{inference_id}/_stream",
"methods": [
"POST"
],
"parts": {
"inference_id": {
"type": "string",
"description": "The inference Id"
}
}
}
]
},
"body": {
"description": "The inference payload"
}
}
}
Loading