@@ -391,21 +391,23 @@ async def put(
391
391
<ul>
392
392
<li>AlibabaCloud AI Search (<code>completion</code>, <code>rerank</code>, <code>sparse_embedding</code>, <code>text_embedding</code>)</li>
393
393
<li>Amazon Bedrock (<code>completion</code>, <code>text_embedding</code>)</li>
394
+ <li>Amazon SageMaker (<code>chat_completion</code>, <code>completion</code>, <code>rerank</code>, <code>sparse_embedding</code>, <code>text_embedding</code>)</li>
394
395
<li>Anthropic (<code>completion</code>)</li>
395
396
<li>Azure AI Studio (<code>completion</code>, <code>text_embedding</code>)</li>
396
397
<li>Azure OpenAI (<code>completion</code>, <code>text_embedding</code>)</li>
397
398
<li>Cohere (<code>completion</code>, <code>rerank</code>, <code>text_embedding</code>)</li>
398
- <li>DeepSeek (<code>completion </code>, <code>chat_completion </code>)</li>
399
+ <li>DeepSeek (<code>chat_completion </code>, <code>completion </code>)</li>
399
400
<li>Elasticsearch (<code>rerank</code>, <code>sparse_embedding</code>, <code>text_embedding</code> - this service is for built-in models and models uploaded through Eland)</li>
400
401
<li>ELSER (<code>sparse_embedding</code>)</li>
401
402
<li>Google AI Studio (<code>completion</code>, <code>text_embedding</code>)</li>
402
- <li>Google Vertex AI (<code>rerank</code>, <code>text_embedding</code>)</li>
403
+ <li>Google Vertex AI (<code>chat_completion</code>, <code>completion</code>, <code> rerank</code>, <code>text_embedding</code>)</li>
403
404
<li>Hugging Face (<code>chat_completion</code>, <code>completion</code>, <code>rerank</code>, <code>text_embedding</code>)</li>
405
+ <li>JinaAI (<code>rerank</code>, <code>text_embedding</code>)</li>
406
+ <li>Llama (<code>chat_completion</code>, <code>completion</code>, <code>text_embedding</code>)</li>
404
407
<li>Mistral (<code>chat_completion</code>, <code>completion</code>, <code>text_embedding</code>)</li>
405
408
<li>OpenAI (<code>chat_completion</code>, <code>completion</code>, <code>text_embedding</code>)</li>
406
- <li>VoyageAI (<code>text_embedding </code>, <code>rerank </code>)</li>
409
+ <li>VoyageAI (<code>rerank </code>, <code>text_embedding </code>)</li>
407
410
<li>Watsonx inference integration (<code>text_embedding</code>)</li>
408
- <li>JinaAI (<code>text_embedding</code>, <code>rerank</code>)</li>
409
411
</ul>
410
412
411
413
@@ -659,6 +661,112 @@ async def put_amazonbedrock(
659
661
path_parts = __path_parts ,
660
662
)
661
663
664
+ @_rewrite_parameters (
665
+ body_fields = (
666
+ "service" ,
667
+ "service_settings" ,
668
+ "chunking_settings" ,
669
+ "task_settings" ,
670
+ ),
671
+ )
672
+ async def put_amazonsagemaker (
673
+ self ,
674
+ * ,
675
+ task_type : t .Union [
676
+ str ,
677
+ t .Literal [
678
+ "chat_completion" ,
679
+ "completion" ,
680
+ "rerank" ,
681
+ "sparse_embedding" ,
682
+ "text_embedding" ,
683
+ ],
684
+ ],
685
+ amazonsagemaker_inference_id : str ,
686
+ service : t .Optional [t .Union [str , t .Literal ["amazon_sagemaker" ]]] = None ,
687
+ service_settings : t .Optional [t .Mapping [str , t .Any ]] = None ,
688
+ chunking_settings : t .Optional [t .Mapping [str , t .Any ]] = None ,
689
+ error_trace : t .Optional [bool ] = None ,
690
+ filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
691
+ human : t .Optional [bool ] = None ,
692
+ pretty : t .Optional [bool ] = None ,
693
+ task_settings : t .Optional [t .Mapping [str , t .Any ]] = None ,
694
+ timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
695
+ body : t .Optional [t .Dict [str , t .Any ]] = None ,
696
+ ) -> ObjectApiResponse [t .Any ]:
697
+ """
698
+ .. raw:: html
699
+
700
+ <p>Create an Amazon SageMaker inference endpoint.</p>
701
+ <p>Create an inference endpoint to perform an inference task with the <code>amazon_sagemaker</code> service.</p>
702
+
703
+
704
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-amazonsagemaker>`_
705
+
706
+ :param task_type: The type of the inference task that the model will perform.
707
+ :param amazonsagemaker_inference_id: The unique identifier of the inference endpoint.
708
+ :param service: The type of service supported for the specified task type. In
709
+ this case, `amazon_sagemaker`.
710
+ :param service_settings: Settings used to install the inference model. These
711
+ settings are specific to the `amazon_sagemaker` service and `service_settings.api`
712
+ you specified.
713
+ :param chunking_settings: The chunking configuration object.
714
+ :param task_settings: Settings to configure the inference task. These settings
715
+ are specific to the task type and `service_settings.api` you specified.
716
+ :param timeout: Specifies the amount of time to wait for the inference endpoint
717
+ to be created.
718
+ """
719
+ if task_type in SKIP_IN_PATH :
720
+ raise ValueError ("Empty value passed for parameter 'task_type'" )
721
+ if amazonsagemaker_inference_id in SKIP_IN_PATH :
722
+ raise ValueError (
723
+ "Empty value passed for parameter 'amazonsagemaker_inference_id'"
724
+ )
725
+ if service is None and body is None :
726
+ raise ValueError ("Empty value passed for parameter 'service'" )
727
+ if service_settings is None and body is None :
728
+ raise ValueError ("Empty value passed for parameter 'service_settings'" )
729
+ __path_parts : t .Dict [str , str ] = {
730
+ "task_type" : _quote (task_type ),
731
+ "amazonsagemaker_inference_id" : _quote (amazonsagemaker_inference_id ),
732
+ }
733
+ __path = f'/_inference/{ __path_parts ["task_type" ]} /{ __path_parts ["amazonsagemaker_inference_id" ]} '
734
+ __query : t .Dict [str , t .Any ] = {}
735
+ __body : t .Dict [str , t .Any ] = body if body is not None else {}
736
+ if error_trace is not None :
737
+ __query ["error_trace" ] = error_trace
738
+ if filter_path is not None :
739
+ __query ["filter_path" ] = filter_path
740
+ if human is not None :
741
+ __query ["human" ] = human
742
+ if pretty is not None :
743
+ __query ["pretty" ] = pretty
744
+ if timeout is not None :
745
+ __query ["timeout" ] = timeout
746
+ if not __body :
747
+ if service is not None :
748
+ __body ["service" ] = service
749
+ if service_settings is not None :
750
+ __body ["service_settings" ] = service_settings
751
+ if chunking_settings is not None :
752
+ __body ["chunking_settings" ] = chunking_settings
753
+ if task_settings is not None :
754
+ __body ["task_settings" ] = task_settings
755
+ if not __body :
756
+ __body = None # type: ignore[assignment]
757
+ __headers = {"accept" : "application/json" }
758
+ if __body is not None :
759
+ __headers ["content-type" ] = "application/json"
760
+ return await self .perform_request ( # type: ignore[return-value]
761
+ "PUT" ,
762
+ __path ,
763
+ params = __query ,
764
+ headers = __headers ,
765
+ body = __body ,
766
+ endpoint_id = "inference.put_amazonsagemaker" ,
767
+ path_parts = __path_parts ,
768
+ )
769
+
662
770
@_rewrite_parameters (
663
771
body_fields = (
664
772
"service" ,
0 commit comments