Skip to content

Commit f3b2caa

Browse files
committed
[DOCS] Adds EIS reference docs.
1 parent 22c0264 commit f3b2caa

File tree

3 files changed

+128
-0
lines changed

3 files changed

+128
-0
lines changed
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
[[infer-service-elastic]]
2+
=== Elastic {infer-cap} Service (EIS)
3+
4+
.New API reference
5+
[sidebar]
6+
--
7+
For the most up-to-date API details, refer to {api-es}/group/endpoint-inference[{infer-cap} APIs].
8+
--
9+
10+
Creates an {infer} endpoint to perform an {infer} task with the `elastic` service.
11+
12+
13+
[discrete]
14+
[[infer-service-elastic-api-request]]
15+
==== {api-request-title}
16+
17+
`PUT /_inference/<task_type>/<inference_id>`
18+
19+
[discrete]
20+
[[infer-service-elastic-api-path-params]]
21+
==== {api-path-parms-title}
22+
23+
`<inference_id>`::
24+
(Required, string)
25+
include::inference-shared.asciidoc[tag=inference-id]
26+
27+
`<task_type>`::
28+
(Required, string)
29+
include::inference-shared.asciidoc[tag=task-type]
30+
+
31+
--
32+
Available task types:
33+
34+
* `chat_completion`,
35+
* `sparse_embedding`.
36+
--
37+
38+
[NOTE]
39+
====
40+
The `chat_completion` task type only supports streaming and only through the `_unified` API.
41+
42+
include::inference-shared.asciidoc[tag=chat-completion-docs]
43+
====
44+
45+
[discrete]
46+
[[infer-service-elastic-api-request-body]]
47+
==== {api-request-body-title}
48+
49+
`chunking_settings`::
50+
(Optional, object)
51+
include::inference-shared.asciidoc[tag=chunking-settings]
52+
53+
`max_chunking_size`:::
54+
(Optional, integer)
55+
include::inference-shared.asciidoc[tag=chunking-settings-max-chunking-size]
56+
57+
`overlap`:::
58+
(Optional, integer)
59+
include::inference-shared.asciidoc[tag=chunking-settings-overlap]
60+
61+
`sentence_overlap`:::
62+
(Optional, integer)
63+
include::inference-shared.asciidoc[tag=chunking-settings-sentence-overlap]
64+
65+
`strategy`:::
66+
(Optional, string)
67+
include::inference-shared.asciidoc[tag=chunking-settings-strategy]
68+
69+
`service`::
70+
(Required, string)
71+
The type of service supported for the specified task type. In this case,
72+
`openai`.
73+
74+
`service_settings`::
75+
(Required, object)
76+
include::inference-shared.asciidoc[tag=service-settings]
77+
+
78+
--
79+
These settings are specific to the `elser` service.
80+
--
81+
82+
83+
`model_id`:::
84+
(Required, string)
85+
The name of the model to use for the {infer} task.
86+
87+
88+
`task_settings`::
89+
(Optional, object)
90+
include::inference-shared.asciidoc[tag=task-settings]
91+
+
92+
.`task_settings` for the `chat_completion` task type
93+
[%collapsible%closed]
94+
=====
95+
`user`:::
96+
(Optional, string)
97+
Specifies the user issuing the request, which can be used for abuse detection.
98+
=====
99+
+
100+
.`task_settings` for the `sparse_embedding` task type
101+
[%collapsible%closed]
102+
=====
103+
`user`:::
104+
(optional, string)
105+
Specifies the user issuing the request, which can be used for abuse detection.
106+
=====
107+
108+
109+
[discrete]
110+
[[inference-example-elastic]]
111+
==== Elastic {infer-cap} Service example
112+
113+
The following example shows how to create an {infer} endpoint called `elser-model-eis` to perform a `text_embedding` task type.
114+
115+
[source,console]
116+
------------------------------------------------------------
117+
PUT _inference/sparse_embedding/elser-model-eis
118+
{
119+
"service": "elastic",
120+
"service_settings": {
121+
"model_name": "elser"
122+
}
123+
}
124+
125+
------------------------------------------------------------
126+
// TEST[skip:TBD]

docs/reference/inference/inference-apis.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ include::chat-completion-inference.asciidoc[]
136136
include::put-inference.asciidoc[]
137137
include::stream-inference.asciidoc[]
138138
include::update-inference.asciidoc[]
139+
include::elastic-inference-service.asciidoc[]
139140
include::service-alibabacloud-ai-search.asciidoc[]
140141
include::service-amazon-bedrock.asciidoc[]
141142
include::service-anthropic.asciidoc[]

docs/reference/inference/put-inference.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ The create {infer} API enables you to create an {infer} endpoint and configure a
5959
* Avoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources.
6060
====
6161

62+
You can create an {infer} endpoint that uses the <<infer-service-elastic>> to perform {infer} tasks as a service without the need of deploying a model in your environment.
6263

6364
The following integrations are available through the {infer} API.
6465
You can find the available task types next to the integration name.

0 commit comments

Comments
 (0)