Skip to content

Commit 576ca53

Browse files
committed
Merge branch 'main' into leemthompo/api-ref-links
2 parents 1e69e94 + 18b631e commit 576ca53

File tree

10 files changed

+1101
-1017
lines changed

10 files changed

+1101
-1017
lines changed

compiler-rs/clients_schema_to_openapi/src/paths.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,18 +502,20 @@ fn split_summary_desc(desc: &str) -> SplitDesc{
502502

503503
fn add_privileges(privileges: &Option<Privileges>) -> Option<String>{
504504
if let Some(privs) = privileges {
505-
let mut result = "\n\n ## Required authorization\n".to_string();
505+
let mut result = "\n\n## Required authorization\n\n".to_string();
506506
if !privs.index.is_empty() {
507507
result += "* Index privileges: ";
508508
result += &privs.index.iter()
509509
.map(|a| format!("`{a}`"))
510510
.join(",");
511+
result += "\n";
511512
}
512513
if !privs.cluster.is_empty() {
513514
result += "* Cluster privileges: ";
514515
result += &privs.cluster.iter()
515516
.map(|a| format!("`{a}`"))
516517
.join(",");
518+
result += "\n";
517519
}
518520
return Some(result)
519521
}
131 Bytes
Binary file not shown.

output/openapi/elasticsearch-openapi.json

Lines changed: 628 additions & 622 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/openapi/elasticsearch-serverless-openapi.json

Lines changed: 298 additions & 298 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema.json

Lines changed: 92 additions & 90 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_doc_ids/table.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ clear-repositories-metering-archive-api,https://www.elastic.co/docs/api/doc/elas
8888
clear-scroll-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-clear-scroll
8989
clear-trained-model,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-clear-trained-model-deployment-cache
9090
cluster-allocation-explain,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-allocation-explain
91+
cluster-allocation-explain-examples,https://www.elastic.co/docs/troubleshoot/elasticsearch/cluster-allocation-api-examples
9192
cluster-get-settings,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-get-settings
9293
cluster-health,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-health
9394
cluster-info,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-info

specification/cluster/allocation_explain/ClusterAllocationExplainRequest.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@ import { Duration } from '@_types/Time'
2828
* For unassigned shards, it provides an explanation for why the shard is unassigned.
2929
* For assigned shards, it provides an explanation for why the shard is remaining on its current node and has not moved or rebalanced to another node.
3030
* This API can be very useful when attempting to diagnose why a shard is unassigned or why a shard continues to remain on its current node when you might expect otherwise.
31+
* Refer to the linked documentation for examples of how to troubleshoot allocation issues using this API.
3132
* @rest_spec_name cluster.allocation_explain
3233
* @availability stack since=5.0.0 stability=stable
3334
* @availability serverless stability=stable visibility=private
3435
* @doc_id cluster-allocation-explain
36+
* @ext_doc_id cluster-allocation-explain-examples
3537
* @doc_tag cluster
3638
*/
3739
export interface Request extends RequestBase {

specification/inference/_types/CommonTypes.ts

Lines changed: 74 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,47 @@ export class RequestChatCompletion {
4747
temperature?: float
4848
/**
4949
* Controls which tool is called by the model.
50+
* String representation: One of `auto`, `none`, or `requrired`. `auto` allows the model to choose between calling tools and generating a message. `none` causes the model to not call any tools. `required` forces the model to call one or more tools.
51+
* Example (object representation):
52+
* ```
53+
* {
54+
* "tool_choice": {
55+
* "type": "function",
56+
* "function": {
57+
* "name": "get_current_weather"
58+
* }
59+
* }
60+
* }
61+
* ```
5062
*/
5163
tool_choice?: CompletionToolType
5264
/**
5365
* A list of tools that the model can call.
66+
* Example:
67+
* ```
68+
* {
69+
* "tools": [
70+
* {
71+
* "type": "function",
72+
* "function": {
73+
* "name": "get_price_of_item",
74+
* "description": "Get the current price of an item",
75+
* "parameters": {
76+
* "type": "object",
77+
* "properties": {
78+
* "item": {
79+
* "id": "12345"
80+
* },
81+
* "unit": {
82+
* "type": "currency"
83+
* }
84+
* }
85+
* }
86+
* }
87+
* }
88+
* ]
89+
* }
90+
* ```
5491
*/
5592
tools?: Array<CompletionTool>
5693
/**
@@ -140,18 +177,52 @@ export type MessageContent = string | Array<ContentObject>
140177
export interface Message {
141178
/**
142179
* The content of the message.
180+
*
181+
* String example:
182+
* ```
183+
* {
184+
* "content": "Some string"
185+
* }
186+
* ```
187+
*
188+
* Object example:
189+
* ```
190+
* {
191+
* "content": [
192+
* {
193+
* "text": "Some text",
194+
* "type": "text"
195+
* }
196+
* ]
197+
* }
198+
* ```
143199
*/
144200
content?: MessageContent
145201
/**
146-
* The role of the message author.
202+
* The role of the message author. Valid values are `user`, `assistant`, `system`, and `tool`.
147203
*/
148204
role: string
149205
/**
150-
* The tool call that this message is responding to.
206+
* Only for `tool` role messages. The tool call that this message is responding to.
151207
*/
152208
tool_call_id?: Id
153209
/**
154-
* The tool calls generated by the model.
210+
* Only for `assistant` role messages. The tool calls generated by the model. If it's specified, the `content` field is optional.
211+
* Example:
212+
* ```
213+
* {
214+
* "tool_calls": [
215+
* {
216+
* "id": "call_KcAjWtAww20AihPHphUh46Gd",
217+
* "type": "function",
218+
* "function": {
219+
* "name": "get_current_weather",
220+
* "arguments": "{\"location\":\"Boston, MA\"}"
221+
* }
222+
* }
223+
* ]
224+
* }
225+
* ```
155226
*/
156227
tool_calls?: Array<ToolCall>
157228
}

specification/inference/put/PutRequest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ import { TaskType } from '@inference/_types/TaskType'
4040
* * ELSER (`sparse_embedding`)
4141
* * Google AI Studio (`completion`, `text_embedding`)
4242
* * Google Vertex AI (`rerank`, `text_embedding`)
43-
* * Hugging Face (`text_embedding`)
44-
* * Mistral (`text_embedding`)
43+
* * Hugging Face (`chat_completion`, `completion`, `text_embedding`)
44+
* * Mistral (`chat_completion`, `completion`, `text_embedding`)
4545
* * OpenAI (`chat_completion`, `completion`, `text_embedding`)
4646
* * VoyageAI (`text_embedding`, `rerank`)
4747
* * Watsonx inference integration (`text_embedding`)

specification/inference/put_amazonbedrock/PutAmazonBedrockRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import { InferenceChunkingSettings } from '@inference/_types/Services'
3030
/**
3131
* Create an Amazon Bedrock inference endpoint.
3232
*
33-
* Creates an inference endpoint to perform an inference task with the `amazonbedrock` service.
33+
* Create an inference endpoint to perform an inference task with the `amazonbedrock` service.
3434
*
3535
* >info
3636
* > You need to provide the access and secret keys only once, during the inference model creation. The get inference API does not retrieve your access or secret keys. After creating the inference model, you cannot change the associated key pairs. If you want to use a different access and secret key pair, delete the inference model and recreate it with the same name and the updated keys.

0 commit comments

Comments
 (0)