Skip to content

Commit 339d4bf

Browse files
[ML] Inference task type separation 8.18 (#3904)
* Inference task type endpoints (#3545) * Refactoring inference endpoints * Fixing stream completion url and removing the old url and class * generating spec * Adding doc id * Renaming to match filename * Switching to stream and regenerating files * Using variant and adding _stream * Removing variant * Adding chat_completion and fixing update api * Resolving conflicts * Fixing merge conflicts
1 parent 16e5e18 commit 339d4bf

25 files changed

+1702
-917
lines changed

output/schema/schema.json

+1,147-705
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

+118-78
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_doc_ids/table.csv

+1
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ inference-api-post,https://www.elastic.co/guide/en/elasticsearch/reference/{bran
320320
inference-api-put,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/put-inference-api.html
321321
inference-api-put-watsonx,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/infer-service-watsonx-ai.html
322322
inference-api-stream,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/stream-inference-api.html
323+
inference-api-chat-completion,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/chat-completion-inference-api.html
323324
inference-api-update,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-inference-api.html
324325
inference-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/inference-processor.html
325326
info-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/info-api.html
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"inference.chat_completion_unified": {
3+
"documentation": {
4+
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/chat-completion-inference.html",
5+
"description": "Perform chat completion inference"
6+
},
7+
"stability": "stable",
8+
"visibility": "public",
9+
"headers": {
10+
"accept": ["text/event-stream"],
11+
"content_type": ["application/json"]
12+
},
13+
"url": {
14+
"paths": [
15+
{
16+
"path": "/_inference/chat_completion/{inference_id}/_stream",
17+
"methods": ["POST"],
18+
"parts": {
19+
"inference_id": {
20+
"type": "string",
21+
"description": "The inference Id"
22+
}
23+
}
24+
}
25+
]
26+
},
27+
"body": {
28+
"description": "The inference payload"
29+
}
30+
}
31+
}

specification/_json_spec/inference.inference.json renamed to specification/_json_spec/inference.completion.json

+3-17
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"inference.inference": {
2+
"inference.completion": {
33
"documentation": {
44
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/post-inference-api.html",
5-
"description": "Perform inference"
5+
"description": "Perform completion inference"
66
},
77
"stability": "experimental",
88
"visibility": "public",
@@ -13,28 +13,14 @@
1313
"url": {
1414
"paths": [
1515
{
16-
"path": "/_inference/{inference_id}",
16+
"path": "/_inference/completion/{inference_id}",
1717
"methods": ["POST"],
1818
"parts": {
1919
"inference_id": {
2020
"type": "string",
2121
"description": "The inference Id"
2222
}
2323
}
24-
},
25-
{
26-
"path": "/_inference/{task_type}/{inference_id}",
27-
"methods": ["POST"],
28-
"parts": {
29-
"task_type": {
30-
"type": "string",
31-
"description": "The task type"
32-
},
33-
"inference_id": {
34-
"type": "string",
35-
"description": "The inference Id"
36-
}
37-
}
3824
}
3925
]
4026
},
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"inference.rerank": {
3+
"documentation": {
4+
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/post-inference-api.html",
5+
"description": "Perform reranking inference"
6+
},
7+
"stability": "stable",
8+
"visibility": "public",
9+
"headers": {
10+
"accept": ["application/json"],
11+
"content_type": ["application/json"]
12+
},
13+
"url": {
14+
"paths": [
15+
{
16+
"path": "/_inference/rerank/{inference_id}",
17+
"methods": ["POST"],
18+
"parts": {
19+
"inference_id": {
20+
"type": "string",
21+
"description": "The inference Id"
22+
}
23+
}
24+
}
25+
]
26+
},
27+
"body": {
28+
"description": "The inference payload"
29+
}
30+
}
31+
}

0 commit comments

Comments
 (0)