@@ -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+
445588export class AnthropicServiceSettings {
446589 /**
447590 * A valid API key for the Anthropic API.
0 commit comments