Skip to content

Commit df74a39

Browse files
committed
Restructures page.
1 parent 6937860 commit df74a39

File tree

1 file changed

+44
-26
lines changed
  • explore-analyze/elastic-inference

1 file changed

+44
-26
lines changed

explore-analyze/elastic-inference/eis.md

Lines changed: 44 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@ Instead, you can use {{ml}} models for ingest, search and chat independently of
1313

1414
% TO DO: Link to the EIS inference endpoint reference docs when it's added to the OpenAPI spec. (Comming soon) %
1515

16-
## Available task types
17-
18-
EIS offers the following {{infer}} task types to perform:
19-
20-
* `chat_completion`
21-
2216
## AI features powered by EIS [ai-features-powered-by-eis]
2317

2418
Your Elastic deployment or project comes with a default `Elastic LLM` connector. This connector is used in the AI Assistant, Attack Discovery, Automatic Import and Search Playground.
2519

2620
% TO DO: Link to the EIS inference endpoint reference docs when it's added to the OpenAPI spec. (Comming soon) %
2721

22+
## Available task types
23+
24+
EIS offers the following {{infer}} task types to perform:
25+
26+
* `chat_completion`
27+
2828
## Default EIS endpoints [default-eis-inference-endpoints]
2929

3030
Your {{es}} deployment includes a preconfigured EIS endpoint, making it easier to use chat completion via the {{infer}} API:
@@ -39,16 +39,7 @@ Your {{es}} deployment includes a preconfigured EIS endpoint, making it easier t
3939

4040
% TO DO: Link to the AI assistant documentation in the different solutions and possibly connector docs. %
4141

42-
## Regions [eis-regions]
43-
44-
All EIS requests are handled by one of these AWS regions:
45-
46-
* `us-east-1`
47-
* `us-west-2`
48-
49-
For more details on AWS regions, refer to the [AWS Global Infrastructure](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/).
50-
51-
## Examples
42+
### Examples
5243

5344
The following example demonstrates how to perform a `chat_completion` task through EIS by using the `.rainbow-sprinkles-elastic` default {{infer}} endpoint.
5445

@@ -69,16 +60,43 @@ POST /_inference/chat_completion/.rainbow-sprinkles-elastic/_stream
6960
The request returns the following response as a stream:
7061

7162
```json
72-
(...)
73-
{
74-
"role" : "assistant",
75-
"content": "Yes",
63+
event: message
64+
data: {
65+
"id" : "unified-45ecde2b-6293-4fd6-a195-4252de76ee63",
66+
"choices" : [
67+
{
68+
"delta" : {
69+
"role" : "assistant"
70+
},
71+
"index" : 0
72+
}
73+
],
7674
"model" : "rainbow-sprinkles",
77-
"usage" : {
78-
"completion_tokens" : 4,
79-
"prompt_tokens" : 13,
80-
"total_tokens" : 17
81-
}
75+
"object" : "chat.completion.chunk"
76+
}
77+
78+
79+
event: message
80+
data: {
81+
"id" : "unified-45ecde2b-6293-4fd6-a195-4252de76ee63",
82+
"choices" : [
83+
{
84+
"delta" : {
85+
"content" : "Yes"
86+
},
87+
"index" : 0
88+
}
89+
],
90+
"model" : "rainbow-sprinkles",
91+
"object" : "chat.completion.chunk"
8292
}
83-
(...)
8493
```
94+
95+
## Regions [eis-regions]
96+
97+
All EIS requests are handled by one of these AWS regions:
98+
99+
* `us-east-1`
100+
* `us-west-2`
101+
102+
For more details on AWS regions, refer to the [AWS Global Infrastructure](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/).

0 commit comments

Comments
 (0)