Skip to content

Commit 16e0155

Browse files
Merge remote-tracking branch 'origin/main' into feature/llama-embedding-completion
# Conflicts: # output/openapi/elasticsearch-openapi.json # output/openapi/elasticsearch-serverless-openapi.json # output/schema/schema.json
2 parents c527e7d + a04b872 commit 16e0155

16 files changed

+419
-1
lines changed

output/typescript/types.ts

Lines changed: 46 additions & 0 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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ alibabacloud-api-keys,https://opensearch.console.aliyun.com/cn-shanghai/rag/api-
88
analysis-analyzers,https://www.elastic.co/docs/reference/text-analysis/analyzer-reference,,
99
amazonbedrock-models,https://docs.aws.amazon.com/bedrock/latest/userguide/models-supported.html,,
1010
amazonbedrock-secret-keys,https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html,,
11+
amazonsagemaker-invoke,https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html,,
12+
amazonsagemaker-secret-keys,https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html,,
1113
analysis-charfilters,https://www.elastic.co/docs/reference/text-analysis/character-filter-reference,,
1214
analysis-normalizers,https://www.elastic.co/docs/reference/text-analysis/normalizers,,
1315
analysis-standard-analyzer,https://www.elastic.co/docs/reference/text-analysis/analysis-standard-analyzer,,
@@ -355,6 +357,7 @@ inference-api-post-eis-chat-completion,https://www.elastic.co/docs/api/doc/elast
355357
inference-api-put,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-inference-api.html,
356358
inference-api-put-alibabacloud,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-alibabacloud,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-alibabacloud-ai-search.html,
357359
inference-api-put-amazonbedrock,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-amazonbedrock,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-amazon-bedrock.html,
360+
inference-api-put-amazonsagemaker,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-amazonsagemaker,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-amazon-sagemaker.html,
358361
inference-api-put-anthropic,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-anthropic,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-anthropic.html,
359362
inference-api-put-azureaistudio,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-azureaistudio,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-azure-ai-studio.html,
360363
inference-api-put-azureopenai,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-azureopenai,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-azure-openai.html,

specification/esql/_types/EsqlResult.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,17 @@ export class EsqlResult {
4343
}
4444

4545
export class AsyncEsqlResult extends EsqlResult {
46+
/**
47+
* The ID of the async query, to be used in subsequent requests to check the status or retrieve results.
48+
*
49+
* Also available in the `X-Elasticsearch-Async-Id` HTTP header.
50+
*/
4651
id?: string
52+
/**
53+
* Indicates whether the async query is still running or has completed.
54+
*
55+
* Also available in the `X-Elasticsearch-Async-Is-Running` HTTP header.
56+
*/
4757
is_running: boolean
4858
}
4959

specification/esql/async_query/AsyncQueryRequest.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,12 @@ export interface Request extends RequestBase {
5858
*/
5959
drop_null_columns?: boolean
6060
/**
61-
* A short version of the Accept header, for example `json` or `yaml`.
61+
* A short version of the Accept header, e.g. json, yaml.
62+
*
63+
* `csv`, `tsv`, and `txt` formats will return results in a tabular format, excluding other metadata fields from the response.
64+
*
65+
* For async requests, nothing will be returned if the async query doesn't finish within the timeout.
66+
* The query ID and running status are available in the `X-Elasticsearch-Async-Id` and `X-Elasticsearch-Async-Is-Running` HTTP headers of the response, respectively.
6267
*/
6368
format?: EsqlFormat
6469
}

specification/esql/query/QueryRequest.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ export interface Request extends RequestBase {
4343
query_parameters: {
4444
/**
4545
* A short version of the Accept header, e.g. json, yaml.
46+
*
47+
* `csv`, `tsv`, and `txt` formats will return results in a tabular format, excluding other metadata fields from the response.
4648
*/
4749
format?: EsqlFormat
4850
/**

specification/inference/_types/CommonTypes.ts

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,149 @@ export enum AmazonBedrockServiceType {
442442
amazonbedrock
443443
}
444444

445+
export class AmazonSageMakerServiceSettings {
446+
/**
447+
* A valid AWS access key that has permissions to use Amazon SageMaker and access to models for invoking requests.
448+
*/
449+
access_key: string
450+
/**
451+
* The name of the SageMaker endpoint.
452+
* @ext_doc_id amazonsagemaker-invoke
453+
*/
454+
endpoint_name: string
455+
/**
456+
* The API format to use when calling SageMaker.
457+
* Elasticsearch will convert the POST _inference request to this data format when invoking the SageMaker endpoint.
458+
*/
459+
api: AmazonSageMakerApi
460+
/**
461+
* The region that your endpoint or Amazon Resource Name (ARN) is deployed in.
462+
* The list of available regions per model can be found in the Amazon SageMaker documentation.
463+
* @ext_doc_id amazonsagemaker-invoke
464+
*/
465+
region: string
466+
/**
467+
* A valid AWS secret key that is paired with the `access_key`.
468+
* For information about creating and managing access and secret keys, refer to the AWS documentation.
469+
* @ext_doc_id amazonsagemaker-secret-keys
470+
*/
471+
secret_key: string
472+
/**
473+
* The model ID when calling a multi-model endpoint.
474+
* @ext_doc_id amazonsagemaker-invoke
475+
*/
476+
target_model?: string
477+
/**
478+
* The container to directly invoke when calling a multi-container endpoint.
479+
* @ext_doc_id amazonsagemaker-invoke
480+
*/
481+
target_container_hostname?: string
482+
/**
483+
* The inference component to directly invoke when calling a multi-component endpoint.
484+
* @ext_doc_id amazonsagemaker-invoke
485+
*/
486+
inference_component_name?: string
487+
/**
488+
* The maximum number of inputs in each batch. This value is used by inference ingestion pipelines
489+
* when processing semantic values. It correlates to the number of times the SageMaker endpoint is
490+
* invoked (one per batch of input).
491+
* @server_default 256
492+
*/
493+
batch_size?: integer
494+
/**
495+
* The number of dimensions returned by the text embedding models. If this value is not provided, then
496+
* it is guessed by making invoking the endpoint for the `text_embedding` task.
497+
*/
498+
dimensions?: integer
499+
}
500+
501+
export enum AmazonSageMakerApi {
502+
openai,
503+
elastic
504+
}
505+
506+
/**
507+
* Service settings specific to the Elastic API for the Amazon SageMaker service.
508+
*/
509+
export class AmazonSageMakerElasticServiceSettings extends AmazonSageMakerServiceSettings {
510+
/**
511+
* Similarity measure used when invoking the `text_embedding` task type.
512+
*/
513+
similarity?: AmazonSageMakerSimilarity
514+
515+
/**
516+
* The data type returned by the text embedding model.
517+
* This value must be set when `task_type` is `text_embedding` and is used when parsing the response
518+
* back to Elasticsearch data structures.
519+
*/
520+
element_type: AmazonSageMakerElementType
521+
}
522+
523+
export enum AmazonSageMakerSimilarity {
524+
cosine,
525+
dot_product,
526+
l2_norm
527+
}
528+
529+
export enum AmazonSageMakerElementType {
530+
byte,
531+
float,
532+
bit
533+
}
534+
535+
export interface AmazonSageMakerTaskSettings {
536+
/**
537+
* The AWS custom attributes passed verbatim through to the model running in the SageMaker Endpoint.
538+
* Values will be returned in the `X-elastic-sagemaker-custom-attributes` header.
539+
* @ext_doc_id amazonsagemaker-invoke
540+
*/
541+
custom_attributes?: string
542+
/**
543+
* The optional JMESPath expression used to override the EnableExplanations provided during endpoint creation.
544+
* @ext_doc_id amazonsagemaker-invoke
545+
*/
546+
enable_explanations?: string
547+
/**
548+
* The capture data ID when enabled in the endpoint.
549+
* @ext_doc_id amazonsagemaker-invoke
550+
*/
551+
inference_id?: string
552+
/**
553+
* The stateful session identifier for a new or existing session.
554+
* New sessions will be returned in the `X-elastic-sagemaker-new-session-id` header.
555+
* Closed sessions will be returned in the `X-elastic-sagemaker-closed-session-id` header.
556+
* @ext_doc_id amazonsagemaker-invoke
557+
*/
558+
session_id?: string
559+
/**
560+
* Specifies the variant when running with multi-variant Endpoints.
561+
* @ext_doc_id amazonsagemaker-invoke
562+
*/
563+
target_variant?: string
564+
}
565+
566+
/**
567+
* `elastic` API allows any key value pair in the task settings when calling the inference endpoint, but it cannot
568+
* be used when creating the inference endpoint.
569+
*/
570+
export class AmazonSageMakerElasticTaskSettings
571+
implements AmazonSageMakerTaskSettings
572+
{
573+
[key: string]: unknown
574+
}
575+
576+
/**
577+
* `openai` API-specific task settings for Amazon SageMaker.
578+
*/
579+
export interface AmazonSageMakerOpenAiTaskSettings
580+
extends AmazonSageMakerTaskSettings {
581+
user?: string
582+
}
583+
584+
export enum AmazonSageMakerServiceType {
585+
amazon_sagemaker
586+
}
587+
445588
export class AnthropicServiceSettings {
446589
/**
447590
* A valid API key for the Anthropic API.

specification/inference/_types/Services.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {
2323
TaskType,
2424
TaskTypeAlibabaCloudAI,
2525
TaskTypeAmazonBedrock,
26+
TaskTypeAmazonSageMaker,
2627
TaskTypeAnthropic,
2728
TaskTypeAzureAIStudio,
2829
TaskTypeAzureOpenAI,
@@ -99,6 +100,17 @@ export class InferenceEndpointInfoAmazonBedrock extends InferenceEndpoint {
99100
task_type: TaskTypeAmazonBedrock
100101
}
101102

103+
export class InferenceEndpointInfoAmazonSageMaker extends InferenceEndpoint {
104+
/**
105+
* The inference Id
106+
*/
107+
inference_id: string
108+
/**
109+
* The task type
110+
*/
111+
task_type: TaskTypeAmazonSageMaker
112+
}
113+
102114
export class InferenceEndpointInfoAnthropic extends InferenceEndpoint {
103115
/**
104116
* The inference Id

specification/inference/_types/TaskType.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ export enum TaskTypeAmazonBedrock {
4545
completion
4646
}
4747

48+
export enum TaskTypeAmazonSageMaker {
49+
text_embedding,
50+
completion,
51+
chat_completion,
52+
sparse_embedding,
53+
rerank
54+
}
55+
4856
export enum TaskTypeAnthropic {
4957
completion
5058
}

specification/inference/put/PutRequest.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import { TaskType } from '@inference/_types/TaskType'
3333
* The following integrations are available through the inference API. You can find the available task types next to the integration name:
3434
* * AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)
3535
* * Amazon Bedrock (`completion`, `text_embedding`)
36+
* * Amazon SageMaker (`chat_completion`, `completion`, `rerank`, `sparse_embedding`, `text_embedding`)
3637
* * Anthropic (`completion`)
3738
* * Azure AI Studio (`completion`, 'rerank', `text_embedding`)
3839
* * Azure OpenAI (`completion`, `text_embedding`)

0 commit comments

Comments
 (0)