From 2a026e0b6155db1dfa9b7df36c0f7be73281ad60 Mon Sep 17 00:00:00 2001 From: Pat Whelan Date: Mon, 30 Jun 2025 07:54:08 -0400 Subject: [PATCH 1/4] [ML] Add DeepSeek Create put request types, objects, and examples for DeepSeek. Verified with `make validate api=inference.put`. --- output/schema/schema.json | 409 ++++++++++++++---- output/typescript/types.ts | 29 ++ specification/_doc_ids/table.csv | 1 + specification/inference/_types/CommonTypes.ts | 33 ++ specification/inference/_types/Services.ts | 12 + specification/inference/_types/TaskType.ts | 5 + specification/inference/put/PutRequest.ts | 1 + .../put_deepseek/PutDeepSeekRequest.ts | 72 +++ .../put_deepseek/PutDeepSeekResponse.ts | 25 ++ .../request/PutDeepSeekRequestExample1.yaml | 80 ++++ .../request/PutDeepSeekRequestExample2.yaml | 80 ++++ 11 files changed, 671 insertions(+), 76 deletions(-) create mode 100644 specification/inference/put_deepseek/PutDeepSeekRequest.ts create mode 100644 specification/inference/put_deepseek/PutDeepSeekResponse.ts create mode 100644 specification/inference/put_deepseek/request/PutDeepSeekRequestExample1.yaml create mode 100644 specification/inference/put_deepseek/request/PutDeepSeekRequestExample2.yaml diff --git a/output/schema/schema.json b/output/schema/schema.json index 7d4f389344..764171842c 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -9811,7 +9811,7 @@ "visibility": "public" } }, - "description": "Create an inference endpoint.\n\nIMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.\n\nThe following integrations are available through the inference API. You can find the available task types next to the integration name:\n* AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Amazon Bedrock (`completion`, `text_embedding`)\n* Anthropic (`completion`)\n* Azure AI Studio (`completion`, `text_embedding`)\n* Azure OpenAI (`completion`, `text_embedding`)\n* Cohere (`completion`, `rerank`, `text_embedding`)\n* Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland)\n* ELSER (`sparse_embedding`)\n* Google AI Studio (`completion`, `text_embedding`)\n* Google Vertex AI (`rerank`, `text_embedding`)\n* Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* Mistral (`chat_completion`, `completion`, `text_embedding`)\n* OpenAI (`chat_completion`, `completion`, `text_embedding`)\n* VoyageAI (`text_embedding`, `rerank`)\n* Watsonx inference integration (`text_embedding`)\n* JinaAI (`text_embedding`, `rerank`)", + "description": "Create an inference endpoint.\n\nIMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.\n\nThe following integrations are available through the inference API. You can find the available task types next to the integration name:\n* AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Amazon Bedrock (`completion`, `text_embedding`)\n* Anthropic (`completion`)\n* Azure AI Studio (`completion`, `text_embedding`)\n* Azure OpenAI (`completion`, `text_embedding`)\n* Cohere (`completion`, `rerank`, `text_embedding`)\n* DeepSeek (`completion`, `chat_completion`)\n* Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland)\n* ELSER (`sparse_embedding`)\n* Google AI Studio (`completion`, `text_embedding`)\n* Google Vertex AI (`rerank`, `text_embedding`)\n* Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* Mistral (`chat_completion`, `completion`, `text_embedding`)\n* OpenAI (`chat_completion`, `completion`, `text_embedding`)\n* VoyageAI (`text_embedding`, `rerank`)\n* Watsonx inference integration (`text_embedding`)\n* JinaAI (`text_embedding`, `rerank`)", "docId": "inference-api-put", "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put", "extPreviousVersionDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-inference-api.html", @@ -10157,20 +10157,38 @@ }, { "availability": { + "serverless": { + "stability": "stable", + "visibility": "public" + }, "stack": { + "since": "9.1.0", "stability": "stable", "visibility": "public" } }, - "description": "Configure a DeepSeek inference endpoint", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-deepseek.html", + "description": "Create a DeepSeek inference endpoint.\n\nCreate an inference endpoint to perform an inference task with the `deepseek` service.", + "docId": "inference-api-put-deepseek", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-deepseek", + "extPreviousVersionDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-deepseek.html", "name": "inference.put_deepseek", - "request": null, + "privileges": { + "cluster": [ + "manage_inference" + ] + }, + "request": { + "name": "Request", + "namespace": "inference.put_deepseek" + }, "requestBodyRequired": false, "requestMediaType": [ "application/json" ], - "response": null, + "response": { + "name": "Response", + "namespace": "inference.put_deepseek" + }, "responseMediaType": [ "application/json" ], @@ -164381,6 +164399,82 @@ ], "specLocation": "inference/_types/CommonTypes.ts#L123-L135" }, + { + "kind": "interface", + "name": { + "name": "DeepSeekServiceSettings", + "namespace": "inference._types" + }, + "properties": [ + { + "description": "A valid API key for your DeepSeek account.\nYou can find or create your DeepSeek API keys on the DeepSeek API key page.\n\nIMPORTANT: You need to provide the API key only once, during the inference model creation.\nThe get inference endpoint API does not retrieve your API key.\nAfter creating the inference model, you cannot change the associated API key.\nIf you want to use a different API key, delete the inference model and recreate it with the same name and the updated API key.", + "extDocId": "deepseek-api-keys", + "name": "api_key", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "For a `completion` or `chat_completion` task, the name of the model to use for the inference task.\n\n* For the available `completion` and `chat_completion` models, refer to the [DeepSeek Models & Pricing docs](https://api-docs.deepseek.com/quick_start/pricing).", + "name": "model_id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "The URL endpoint to use for the requests. Defaults to `https://api.deepseek.com/chat/completions`.", + "name": "url", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "inference/_types/CommonTypes.ts#L773-L795" + }, + { + "kind": "enum", + "members": [ + { + "name": "deepseek" + } + ], + "name": { + "name": "DeepSeekServiceType", + "namespace": "inference._types" + }, + "specLocation": "inference/_types/CommonTypes.ts#L802-L804" + }, + { + "kind": "enum", + "members": [ + { + "name": "completion" + }, + { + "name": "chat_completion" + } + ], + "name": { + "name": "DeepSeekTaskType", + "namespace": "inference._types" + }, + "specLocation": "inference/_types/CommonTypes.ts#L797-L800" + }, { "kind": "interface", "description": "Acknowledged response. For dry_run, contains the list of pipelines which reference the inference endpoint", @@ -164520,7 +164614,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L781-L815" + "specLocation": "inference/_types/CommonTypes.ts#L814-L848" }, { "kind": "enum", @@ -164533,7 +164627,7 @@ "name": "ElasticsearchServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L831-L833" + "specLocation": "inference/_types/CommonTypes.ts#L864-L866" }, { "kind": "interface", @@ -164556,7 +164650,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L817-L823" + "specLocation": "inference/_types/CommonTypes.ts#L850-L856" }, { "kind": "enum", @@ -164575,7 +164669,7 @@ "name": "ElasticsearchTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L825-L829" + "specLocation": "inference/_types/CommonTypes.ts#L858-L862" }, { "kind": "interface", @@ -164621,7 +164715,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L835-L861" + "specLocation": "inference/_types/CommonTypes.ts#L868-L894" }, { "kind": "enum", @@ -164634,7 +164728,7 @@ "name": "ElserServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L867-L869" + "specLocation": "inference/_types/CommonTypes.ts#L900-L902" }, { "kind": "enum", @@ -164647,7 +164741,7 @@ "name": "ElserTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L863-L865" + "specLocation": "inference/_types/CommonTypes.ts#L896-L898" }, { "kind": "enum", @@ -164660,7 +164754,7 @@ "name": "GoogleAiServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L894-L896" + "specLocation": "inference/_types/CommonTypes.ts#L927-L929" }, { "kind": "interface", @@ -164708,7 +164802,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L871-L887" + "specLocation": "inference/_types/CommonTypes.ts#L904-L920" }, { "kind": "enum", @@ -164724,7 +164818,7 @@ "name": "GoogleAiStudioTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L889-L892" + "specLocation": "inference/_types/CommonTypes.ts#L922-L925" }, { "kind": "interface", @@ -164798,7 +164892,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L898-L924" + "specLocation": "inference/_types/CommonTypes.ts#L931-L957" }, { "kind": "enum", @@ -164811,7 +164905,7 @@ "name": "GoogleVertexAIServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L944-L946" + "specLocation": "inference/_types/CommonTypes.ts#L977-L979" }, { "kind": "interface", @@ -164845,7 +164939,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L926-L935" + "specLocation": "inference/_types/CommonTypes.ts#L959-L968" }, { "kind": "enum", @@ -164867,7 +164961,7 @@ "name": "GoogleVertexAITaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L937-L942" + "specLocation": "inference/_types/CommonTypes.ts#L970-L975" }, { "kind": "interface", @@ -164929,7 +165023,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L948-L980" + "specLocation": "inference/_types/CommonTypes.ts#L981-L1013" }, { "kind": "enum", @@ -164942,7 +165036,7 @@ "name": "HuggingFaceServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1001-L1003" + "specLocation": "inference/_types/CommonTypes.ts#L1034-L1036" }, { "kind": "interface", @@ -164976,7 +165070,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L982-L992" + "specLocation": "inference/_types/CommonTypes.ts#L1015-L1025" }, { "kind": "enum", @@ -164998,7 +165092,7 @@ "name": "HuggingFaceTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L994-L999" + "specLocation": "inference/_types/CommonTypes.ts#L1027-L1032" }, { "kind": "interface", @@ -165061,7 +165155,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L254-L283" + "specLocation": "inference/_types/Services.ts#L266-L295" }, { "kind": "interface", @@ -165120,7 +165214,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L42-L62" + "specLocation": "inference/_types/Services.ts#L43-L63" }, { "kind": "interface", @@ -165161,7 +165255,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L64-L76" + "specLocation": "inference/_types/Services.ts#L65-L77" }, { "kind": "interface", @@ -165201,7 +165295,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L89-L98" + "specLocation": "inference/_types/Services.ts#L90-L99" }, { "kind": "interface", @@ -165241,7 +165335,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L100-L109" + "specLocation": "inference/_types/Services.ts#L101-L110" }, { "kind": "interface", @@ -165281,7 +165375,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L111-L120" + "specLocation": "inference/_types/Services.ts#L112-L121" }, { "kind": "interface", @@ -165321,7 +165415,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L122-L131" + "specLocation": "inference/_types/Services.ts#L123-L132" }, { "kind": "interface", @@ -165361,7 +165455,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L133-L142" + "specLocation": "inference/_types/Services.ts#L134-L143" }, { "kind": "interface", @@ -165401,7 +165495,47 @@ } } ], - "specLocation": "inference/_types/Services.ts#L144-L153" + "specLocation": "inference/_types/Services.ts#L145-L154" + }, + { + "kind": "interface", + "inherits": { + "type": { + "name": "InferenceEndpoint", + "namespace": "inference._types" + } + }, + "name": { + "name": "InferenceEndpointInfoDeepSeek", + "namespace": "inference._types" + }, + "properties": [ + { + "description": "The inference Id", + "name": "inference_id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "The task type", + "name": "task_type", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "TaskTypeDeepSeek", + "namespace": "inference._types" + } + } + } + ], + "specLocation": "inference/_types/Services.ts#L156-L165" }, { "kind": "interface", @@ -165441,7 +165575,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L166-L175" + "specLocation": "inference/_types/Services.ts#L178-L187" }, { "kind": "interface", @@ -165481,7 +165615,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L155-L164" + "specLocation": "inference/_types/Services.ts#L167-L176" }, { "kind": "interface", @@ -165521,7 +165655,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L177-L186" + "specLocation": "inference/_types/Services.ts#L189-L198" }, { "kind": "interface", @@ -165561,7 +165695,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L188-L197" + "specLocation": "inference/_types/Services.ts#L200-L209" }, { "kind": "interface", @@ -165601,7 +165735,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L199-L208" + "specLocation": "inference/_types/Services.ts#L211-L220" }, { "kind": "interface", @@ -165641,7 +165775,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L78-L87" + "specLocation": "inference/_types/Services.ts#L79-L88" }, { "kind": "interface", @@ -165681,7 +165815,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L210-L219" + "specLocation": "inference/_types/Services.ts#L222-L231" }, { "kind": "interface", @@ -165721,7 +165855,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L221-L230" + "specLocation": "inference/_types/Services.ts#L233-L242" }, { "kind": "interface", @@ -165761,7 +165895,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L232-L241" + "specLocation": "inference/_types/Services.ts#L244-L253" }, { "kind": "interface", @@ -165801,7 +165935,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L243-L252" + "specLocation": "inference/_types/Services.ts#L255-L264" }, { "kind": "interface", @@ -165961,7 +166095,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1005-L1034" + "specLocation": "inference/_types/CommonTypes.ts#L1038-L1067" }, { "kind": "enum", @@ -165974,7 +166108,7 @@ "name": "JinaAIServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1064-L1066" + "specLocation": "inference/_types/CommonTypes.ts#L1097-L1099" }, { "kind": "enum", @@ -165993,7 +166127,7 @@ "name": "JinaAISimilarityType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1068-L1072" + "specLocation": "inference/_types/CommonTypes.ts#L1101-L1105" }, { "kind": "interface", @@ -166039,7 +166173,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1036-L1057" + "specLocation": "inference/_types/CommonTypes.ts#L1069-L1090" }, { "kind": "enum", @@ -166055,7 +166189,7 @@ "name": "JinaAITaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1059-L1062" + "specLocation": "inference/_types/CommonTypes.ts#L1092-L1095" }, { "kind": "enum", @@ -166077,7 +166211,7 @@ "name": "JinaAITextEmbeddingTask", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1074-L1079" + "specLocation": "inference/_types/CommonTypes.ts#L1107-L1112" }, { "kind": "interface", @@ -166235,7 +166369,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1081-L1108" + "specLocation": "inference/_types/CommonTypes.ts#L1114-L1141" }, { "kind": "enum", @@ -166248,7 +166382,7 @@ "name": "MistralServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1116-L1118" + "specLocation": "inference/_types/CommonTypes.ts#L1149-L1151" }, { "kind": "enum", @@ -166267,7 +166401,7 @@ "name": "MistralTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1110-L1114" + "specLocation": "inference/_types/CommonTypes.ts#L1143-L1147" }, { "kind": "interface", @@ -166354,7 +166488,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1120-L1162" + "specLocation": "inference/_types/CommonTypes.ts#L1153-L1195" }, { "kind": "enum", @@ -166367,7 +166501,7 @@ "name": "OpenAIServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1178-L1180" + "specLocation": "inference/_types/CommonTypes.ts#L1211-L1213" }, { "kind": "interface", @@ -166389,7 +166523,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1164-L1170" + "specLocation": "inference/_types/CommonTypes.ts#L1197-L1203" }, { "kind": "enum", @@ -166408,7 +166542,7 @@ "name": "OpenAITaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1172-L1176" + "specLocation": "inference/_types/CommonTypes.ts#L1205-L1209" }, { "kind": "interface", @@ -166475,7 +166609,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L289-L315" + "specLocation": "inference/_types/Services.ts#L301-L327" }, { "kind": "interface", @@ -166623,7 +166757,7 @@ "name": "ServiceSettings", "namespace": "inference._types" }, - "specLocation": "inference/_types/Services.ts#L285-L285", + "specLocation": "inference/_types/Services.ts#L297-L297", "type": { "kind": "user_defined_value" } @@ -166707,7 +166841,7 @@ "name": "TaskSettings", "namespace": "inference._types" }, - "specLocation": "inference/_types/Services.ts#L287-L287", + "specLocation": "inference/_types/Services.ts#L299-L299", "type": { "kind": "user_defined_value" } @@ -166839,6 +166973,22 @@ }, "specLocation": "inference/_types/TaskType.ts#L62-L66" }, + { + "kind": "enum", + "members": [ + { + "name": "completion" + }, + { + "name": "chat_completion" + } + ], + "name": { + "name": "TaskTypeDeepSeek", + "namespace": "inference._types" + }, + "specLocation": "inference/_types/TaskType.ts#L68-L71" + }, { "kind": "enum", "members": [ @@ -166850,7 +167000,7 @@ "name": "TaskTypeELSER", "namespace": "inference._types" }, - "specLocation": "inference/_types/TaskType.ts#L74-L76" + "specLocation": "inference/_types/TaskType.ts#L79-L81" }, { "kind": "enum", @@ -166869,7 +167019,7 @@ "name": "TaskTypeElasticsearch", "namespace": "inference._types" }, - "specLocation": "inference/_types/TaskType.ts#L68-L72" + "specLocation": "inference/_types/TaskType.ts#L73-L77" }, { "kind": "enum", @@ -166885,7 +167035,7 @@ "name": "TaskTypeGoogleAIStudio", "namespace": "inference._types" }, - "specLocation": "inference/_types/TaskType.ts#L78-L81" + "specLocation": "inference/_types/TaskType.ts#L83-L86" }, { "kind": "enum", @@ -166901,7 +167051,7 @@ "name": "TaskTypeGoogleVertexAI", "namespace": "inference._types" }, - "specLocation": "inference/_types/TaskType.ts#L83-L86" + "specLocation": "inference/_types/TaskType.ts#L88-L91" }, { "kind": "enum", @@ -166923,7 +167073,7 @@ "name": "TaskTypeHuggingFace", "namespace": "inference._types" }, - "specLocation": "inference/_types/TaskType.ts#L88-L93" + "specLocation": "inference/_types/TaskType.ts#L93-L98" }, { "kind": "enum", @@ -166958,7 +167108,7 @@ "name": "TaskTypeMistral", "namespace": "inference._types" }, - "specLocation": "inference/_types/TaskType.ts#L95-L99" + "specLocation": "inference/_types/TaskType.ts#L100-L104" }, { "kind": "enum", @@ -166977,7 +167127,7 @@ "name": "TaskTypeOpenAI", "namespace": "inference._types" }, - "specLocation": "inference/_types/TaskType.ts#L101-L105" + "specLocation": "inference/_types/TaskType.ts#L106-L110" }, { "kind": "enum", @@ -166993,7 +167143,7 @@ "name": "TaskTypeVoyageAI", "namespace": "inference._types" }, - "specLocation": "inference/_types/TaskType.ts#L107-L110" + "specLocation": "inference/_types/TaskType.ts#L112-L115" }, { "kind": "enum", @@ -167012,7 +167162,7 @@ "name": "TaskTypeWatsonx", "namespace": "inference._types" }, - "specLocation": "inference/_types/TaskType.ts#L112-L116" + "specLocation": "inference/_types/TaskType.ts#L117-L121" }, { "kind": "interface", @@ -167258,7 +167408,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1182-L1213" + "specLocation": "inference/_types/CommonTypes.ts#L1215-L1246" }, { "kind": "enum", @@ -167271,7 +167421,7 @@ "name": "VoyageAIServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1246-L1248" + "specLocation": "inference/_types/CommonTypes.ts#L1279-L1281" }, { "kind": "interface", @@ -167331,7 +167481,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1215-L1239" + "specLocation": "inference/_types/CommonTypes.ts#L1248-L1272" }, { "kind": "enum", @@ -167347,7 +167497,7 @@ "name": "VoyageAITaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1241-L1244" + "specLocation": "inference/_types/CommonTypes.ts#L1274-L1277" }, { "kind": "interface", @@ -167435,7 +167585,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1250-L1288" + "specLocation": "inference/_types/CommonTypes.ts#L1283-L1321" }, { "kind": "enum", @@ -167448,7 +167598,7 @@ "name": "WatsonxServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1296-L1298" + "specLocation": "inference/_types/CommonTypes.ts#L1329-L1331" }, { "kind": "enum", @@ -167467,7 +167617,7 @@ "name": "WatsonxTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1290-L1294" + "specLocation": "inference/_types/CommonTypes.ts#L1323-L1327" }, { "kind": "request", @@ -168182,7 +168332,7 @@ } } }, - "description": "Create an inference endpoint.\n\nIMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.\n\nThe following integrations are available through the inference API. You can find the available task types next to the integration name:\n* AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Amazon Bedrock (`completion`, `text_embedding`)\n* Anthropic (`completion`)\n* Azure AI Studio (`completion`, `text_embedding`)\n* Azure OpenAI (`completion`, `text_embedding`)\n* Cohere (`completion`, `rerank`, `text_embedding`)\n* Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland)\n* ELSER (`sparse_embedding`)\n* Google AI Studio (`completion`, `text_embedding`)\n* Google Vertex AI (`rerank`, `text_embedding`)\n* Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* Mistral (`chat_completion`, `completion`, `text_embedding`)\n* OpenAI (`chat_completion`, `completion`, `text_embedding`)\n* VoyageAI (`text_embedding`, `rerank`)\n* Watsonx inference integration (`text_embedding`)\n* JinaAI (`text_embedding`, `rerank`)", + "description": "Create an inference endpoint.\n\nIMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.\n\nThe following integrations are available through the inference API. You can find the available task types next to the integration name:\n* AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Amazon Bedrock (`completion`, `text_embedding`)\n* Anthropic (`completion`)\n* Azure AI Studio (`completion`, `text_embedding`)\n* Azure OpenAI (`completion`, `text_embedding`)\n* Cohere (`completion`, `rerank`, `text_embedding`)\n* DeepSeek (`completion`, `chat_completion`)\n* Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland)\n* ELSER (`sparse_embedding`)\n* Google AI Studio (`completion`, `text_embedding`)\n* Google Vertex AI (`rerank`, `text_embedding`)\n* Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* Mistral (`chat_completion`, `completion`, `text_embedding`)\n* OpenAI (`chat_completion`, `completion`, `text_embedding`)\n* VoyageAI (`text_embedding`, `rerank`)\n* Watsonx inference integration (`text_embedding`)\n* JinaAI (`text_embedding`, `rerank`)", "examples": { "InferencePutExample1": { "alternatives": [ @@ -168253,7 +168403,7 @@ } ], "query": [], - "specLocation": "inference/put/PutRequest.ts#L25-L78" + "specLocation": "inference/put/PutRequest.ts#L25-L79" }, { "kind": "response", @@ -169415,6 +169565,113 @@ }, "specLocation": "inference/put_cohere/PutCohereResponse.ts#L22-L25" }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "properties", + "properties": [ + { + "description": "The chunking configuration object.", + "extDocId": "inference-chunking", + "extDocUrl": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config", + "name": "chunking_settings", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "InferenceChunkingSettings", + "namespace": "inference._types" + } + } + }, + { + "description": "The type of service supported for the specified task type. In this case, `deepseek`.", + "name": "service", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "DeepSeekServiceType", + "namespace": "inference._types" + } + } + }, + { + "description": "Settings used to install the inference model.\nThese settings are specific to the `deepseek` service.", + "name": "service_settings", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "DeepSeekServiceSettings", + "namespace": "inference._types" + } + } + } + ] + }, + "description": "Create a DeepSeek inference endpoint.\n\nCreate an inference endpoint to perform an inference task with the `deepseek` service.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "Request", + "namespace": "inference.put_deepseek" + }, + "path": [ + { + "description": "The type of the inference task that the model will perform.", + "name": "task_type", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "DeepSeekTaskType", + "namespace": "inference._types" + } + } + }, + { + "description": "The unique identifier of the inference endpoint.", + "name": "deepseek_inference_id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + } + ], + "query": [], + "specLocation": "inference/put_deepseek/PutDeepSeekRequest.ts#L29-L72" + }, + { + "kind": "response", + "body": { + "kind": "value", + "codegenName": "endpoint_info", + "value": { + "kind": "instance_of", + "type": { + "name": "InferenceEndpointInfoDeepSeek", + "namespace": "inference._types" + } + } + }, + "name": { + "name": "Response", + "namespace": "inference.put_deepseek" + }, + "specLocation": "inference/put_deepseek/PutDeepSeekResponse.ts#L22-L25" + }, { "kind": "request", "attachedBehaviors": [ diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 8802ff3e24..4d1e9eed43 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -13620,6 +13620,16 @@ export interface InferenceContentObject { type: string } +export interface InferenceDeepSeekServiceSettings { + api_key: string + model_id: string + url?: string +} + +export type InferenceDeepSeekServiceType = 'deepseek' + +export type InferenceDeepSeekTaskType = 'completion' | 'chat_completion' + export interface InferenceDeleteInferenceEndpointResult extends AcknowledgedResponseBase { pipelines: string[] } @@ -13746,6 +13756,11 @@ export interface InferenceInferenceEndpointInfoCohere extends InferenceInference task_type: InferenceTaskTypeCohere } +export interface InferenceInferenceEndpointInfoDeepSeek extends InferenceInferenceEndpoint { + inference_id: string + task_type: InferenceTaskTypeDeepSeek +} + export interface InferenceInferenceEndpointInfoELSER extends InferenceInferenceEndpoint { inference_id: string task_type: InferenceTaskTypeELSER @@ -13916,6 +13931,8 @@ export type InferenceTaskTypeAzureOpenAI = 'text_embedding' | 'completion' export type InferenceTaskTypeCohere = 'text_embedding' | 'rerank' | 'completion' +export type InferenceTaskTypeDeepSeek = 'completion' | 'chat_completion' + export type InferenceTaskTypeELSER = 'sparse_embedding' export type InferenceTaskTypeElasticsearch = 'sparse_embedding' | 'text_embedding' | 'rerank' @@ -14128,6 +14145,18 @@ export interface InferencePutCohereRequest extends RequestBase { export type InferencePutCohereResponse = InferenceInferenceEndpointInfoCohere +export interface InferencePutDeepseekRequest extends RequestBase { + task_type: InferenceDeepSeekTaskType + deepseek_inference_id: Id + body?: { + chunking_settings?: InferenceInferenceChunkingSettings + service: InferenceDeepSeekServiceType + service_settings: InferenceDeepSeekServiceSettings + } +} + +export type InferencePutDeepseekResponse = InferenceInferenceEndpointInfoDeepSeek + export interface InferencePutElasticsearchRequest extends RequestBase { task_type: InferenceElasticsearchTaskType elasticsearch_inference_id: Id diff --git a/specification/_doc_ids/table.csv b/specification/_doc_ids/table.csv index 6a0a214e4f..ca19ae7f49 100644 --- a/specification/_doc_ids/table.csv +++ b/specification/_doc_ids/table.csv @@ -354,6 +354,7 @@ inference-api-put-anthropic,https://www.elastic.co/docs/api/doc/elasticsearch/op 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 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 inference-api-put-cohere,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-cohere,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-cohere.html +inference-api-put-deepseek,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-deepseek,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-deepseek.html inference-api-put-eis,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-eis, inference-api-put-elasticsearch,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-elasticsearch,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-elasticsearch.html inference-api-put-elser,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-elser,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/infer-service-elser.html diff --git a/specification/inference/_types/CommonTypes.ts b/specification/inference/_types/CommonTypes.ts index 454be45c19..123d2eb3c0 100644 --- a/specification/inference/_types/CommonTypes.ts +++ b/specification/inference/_types/CommonTypes.ts @@ -770,6 +770,39 @@ export class EisServiceSettings { rate_limit?: RateLimitSetting } +export class DeepSeekServiceSettings { + /** + * A valid API key for your DeepSeek account. + * You can find or create your DeepSeek API keys on the DeepSeek API key page. + * + * IMPORTANT: You need to provide the API key only once, during the inference model creation. + * The get inference endpoint API does not retrieve your API key. + * After creating the inference model, you cannot change the associated API key. + * If you want to use a different API key, delete the inference model and recreate it with the same name and the updated API key. + * @ext_doc_id deepseek-api-keys + */ + api_key: string + /** + * For a `completion` or `chat_completion` task, the name of the model to use for the inference task. + * + * * For the available `completion` and `chat_completion` models, refer to the [DeepSeek Models & Pricing docs](https://api-docs.deepseek.com/quick_start/pricing). + */ + model_id: string + /** + * The URL endpoint to use for the requests. Defaults to `https://api.deepseek.com/chat/completions`. + */ + url?: string +} + +export enum DeepSeekTaskType { + completion, + chat_completion +} + +export enum DeepSeekServiceType { + deepseek +} + export enum EisTaskType { chat_completion } diff --git a/specification/inference/_types/Services.ts b/specification/inference/_types/Services.ts index 23003780cc..720dd9ea43 100644 --- a/specification/inference/_types/Services.ts +++ b/specification/inference/_types/Services.ts @@ -27,6 +27,7 @@ import { TaskTypeAzureAIStudio, TaskTypeAzureOpenAI, TaskTypeCohere, + TaskTypeDeepSeek, TaskTypeElasticsearch, TaskTypeELSER, TaskTypeGoogleAIStudio, @@ -152,6 +153,17 @@ export class InferenceEndpointInfoCohere extends InferenceEndpoint { task_type: TaskTypeCohere } +export class InferenceEndpointInfoDeepSeek extends InferenceEndpoint { + /** + * The inference Id + */ + inference_id: string + /** + * The task type + */ + task_type: TaskTypeDeepSeek +} + export class InferenceEndpointInfoElasticsearch extends InferenceEndpoint { /** * The inference Id diff --git a/specification/inference/_types/TaskType.ts b/specification/inference/_types/TaskType.ts index 3b8721049c..670dc3d3e5 100644 --- a/specification/inference/_types/TaskType.ts +++ b/specification/inference/_types/TaskType.ts @@ -65,6 +65,11 @@ export enum TaskTypeCohere { completion } +export enum TaskTypeDeepSeek { + completion, + chat_completion +} + export enum TaskTypeElasticsearch { sparse_embedding, text_embedding, diff --git a/specification/inference/put/PutRequest.ts b/specification/inference/put/PutRequest.ts index f62d6c4e14..89d4ab9bcd 100644 --- a/specification/inference/put/PutRequest.ts +++ b/specification/inference/put/PutRequest.ts @@ -36,6 +36,7 @@ import { TaskType } from '@inference/_types/TaskType' * * Azure AI Studio (`completion`, `text_embedding`) * * Azure OpenAI (`completion`, `text_embedding`) * * Cohere (`completion`, `rerank`, `text_embedding`) + * * DeepSeek (`completion`, `chat_completion`) * * Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland) * * ELSER (`sparse_embedding`) * * Google AI Studio (`completion`, `text_embedding`) diff --git a/specification/inference/put_deepseek/PutDeepSeekRequest.ts b/specification/inference/put_deepseek/PutDeepSeekRequest.ts new file mode 100644 index 0000000000..6d096b15b5 --- /dev/null +++ b/specification/inference/put_deepseek/PutDeepSeekRequest.ts @@ -0,0 +1,72 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { RequestBase } from '@_types/Base' +import { Id } from '@_types/common' +import { + DeepSeekServiceSettings, + DeepSeekServiceType, + DeepSeekTaskType +} from '@inference/_types/CommonTypes' +import { InferenceChunkingSettings } from '@inference/_types/Services' + +/** + * Create a DeepSeek inference endpoint. + * + * Create an inference endpoint to perform an inference task with the `deepseek` service. + * @rest_spec_name inference.put_deepseek + * @availability stack since=9.1.0 stability=stable visibility=public + * @availability serverless stability=stable visibility=public + * @cluster_privileges manage_inference + * @doc_id inference-api-put-deepseek + */ +export interface Request extends RequestBase { + urls: [ + { + path: '/_inference/{task_type}/{deepseek_inference_id}' + methods: ['PUT'] + } + ] + path_parts: { + /** + * The type of the inference task that the model will perform. + */ + task_type: DeepSeekTaskType + /** + * The unique identifier of the inference endpoint. + */ + deepseek_inference_id: Id + } + body: { + /** + * The chunking configuration object. + * @ext_doc_id inference-chunking + */ + chunking_settings?: InferenceChunkingSettings + /** + * The type of service supported for the specified task type. In this case, `deepseek`. + */ + service: DeepSeekServiceType + /** + * Settings used to install the inference model. + * These settings are specific to the `deepseek` service. + */ + service_settings: DeepSeekServiceSettings + } +} diff --git a/specification/inference/put_deepseek/PutDeepSeekResponse.ts b/specification/inference/put_deepseek/PutDeepSeekResponse.ts new file mode 100644 index 0000000000..d2c14e6103 --- /dev/null +++ b/specification/inference/put_deepseek/PutDeepSeekResponse.ts @@ -0,0 +1,25 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { InferenceEndpointInfoDeepSeek } from '@inference/_types/Services' + +export class Response { + /** @codegen_name endpoint_info */ + body: InferenceEndpointInfoDeepSeek +} diff --git a/specification/inference/put_deepseek/request/PutDeepSeekRequestExample1.yaml b/specification/inference/put_deepseek/request/PutDeepSeekRequestExample1.yaml new file mode 100644 index 0000000000..616dcf07ce --- /dev/null +++ b/specification/inference/put_deepseek/request/PutDeepSeekRequestExample1.yaml @@ -0,0 +1,80 @@ +summary: A completion task +description: Run `PUT _inference/completion/deepseek-completion` to create an inference endpoint that performs a completion task. +method_request: 'PUT _inference/completion/deepseek-completion' +# type: "request" +value: |- + { + "service": "deepseek", + "service_settings": { + "api_key": "DeepSeek-Api-key", + "model_id": "deepseek-chat" + } + } +alternatives: + - language: Python + code: |- + resp = client.inference.put( + task_type="completion", + inference_id="deepseek-completion", + inference_config={ + "service": "deepseek", + "service_settings": { + "api_key": "DeepSeek-Api-key", + "model_id": "deepseek-chat" + } + }, + ) + - language: JavaScript + code: |- + const response = await client.inference.put({ + task_type: "completion", + inference_id: "deepseek-completion", + inference_config: { + service: "deepseek", + service_settings: { + api_key: "DeepSeek-Api-key", + model_id: "deepseek-chat" + }, + }, + }); + - language: Ruby + code: |- + response = client.inference.put( + task_type: "completion", + inference_id: "deepseek-completion", + body: { + "service": "deepseek", + "service_settings": { + "api_key": "DeepSeek-Api-key", + "model_id": "deepseek-chat" + } + } + ) + - language: PHP + code: |- + $resp = $client->inference()->put([ + "task_type" => "completion", + "inference_id" => "deepseek-completion", + "body" => [ + "service" => "deepseek", + "service_settings" => [ + "api_key" => "DeepSeek-Api-key", + "model_id" => "deepseek-chat" + ], + ], + ]); + - language: curl + code: + "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d + '{\"service\":\"deepseek\",\"service_settings\":{\"api_key\":\"DeepSeek-Api-key\",\"model_id\":\"deepseek-chat\" + }' \"$ELASTICSEARCH_URL/_inference/completion/deepseek-completion\"" + - language: Java + code: > + client.inference().put(p -> p + .inferenceId("deepseek-completion") + .taskType(TaskType.Completion) + .inferenceConfig(i -> i + .service("deepseek") + .serviceSettings(JsonData.fromJson("{\"api_key\":\"DeepSeek-Api-key\",\"model_id\":\"deepseek-chat\"}")) + ) + ); diff --git a/specification/inference/put_deepseek/request/PutDeepSeekRequestExample2.yaml b/specification/inference/put_deepseek/request/PutDeepSeekRequestExample2.yaml new file mode 100644 index 0000000000..da393069a6 --- /dev/null +++ b/specification/inference/put_deepseek/request/PutDeepSeekRequestExample2.yaml @@ -0,0 +1,80 @@ +summary: A chat completion task +description: Run `PUT _inference/chat_completion/deepseek-chat-completion` to create an inference endpoint that performs a chat completion task. +method_request: 'PUT _inference/chat_completion/deepseek-chat-completion' +# type: "request" +value: |- + { + "service": "deepseek", + "service_settings": { + "api_key": "DeepSeek-Api-key", + "model_id": "deepseek-chat" + } + } +alternatives: + - language: Python + code: |- + resp = client.inference.put( + task_type="chat_completion", + inference_id="deepseek-chat-completion", + inference_config={ + "service": "deepseek", + "service_settings": { + "api_key": "DeepSeek-Api-key", + "model_id": "deepseek-chat" + } + }, + ) + - language: JavaScript + code: |- + const response = await client.inference.put({ + task_type: "chat_completion", + inference_id: "deepseek-chat-completion", + inference_config: { + service: "deepseek", + service_settings: { + api_key: "DeepSeek-Api-key", + model_id: "deepseek-chat" + }, + }, + }); + - language: Ruby + code: |- + response = client.inference.put( + task_type: "chat_completion", + inference_id: "deepseek-chat-completion", + body: { + "service": "deepseek", + "service_settings": { + "api_key": "DeepSeek-Api-key", + "model_id": "deepseek-chat" + } + } + ) + - language: PHP + code: |- + $resp = $client->inference()->put([ + "task_type" => "chat_completion", + "inference_id" => "deepseek-chat-completion", + "body" => [ + "service" => "deepseek", + "service_settings" => [ + "api_key" => "DeepSeek-Api-key", + "model_id" => "deepseek-chat" + ], + ], + ]); + - language: curl + code: + "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d + '{\"service\":\"deepseek\",\"service_settings\":{\"api_key\":\"DeepSeek-Api-key\",\"model_id\":\"deepseek-chat\" + }' \"$ELASTICSEARCH_URL/_inference/chat_completion/deepseekdeepseek-chat-completion\"" + - language: Java + code: > + client.inference().put(p -> p + .inferenceId("deepseek-chat-completion") + .taskType(TaskType.ChatCompletion) + .inferenceConfig(i -> i + .service("deepseek") + .serviceSettings(JsonData.fromJson("{\"api_key\":\"DeepSeek-Api-key\",\"model_id\":\"deepseek-chat\"}")) + ) + ); From 34233f9830ddc5e23624fca48ebfbe5ac45ecde0 Mon Sep 17 00:00:00 2001 From: Pat Whelan Date: Mon, 30 Jun 2025 08:24:19 -0400 Subject: [PATCH 2/4] Add missing docid --- specification/_doc_ids/table.csv | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specification/_doc_ids/table.csv b/specification/_doc_ids/table.csv index ca19ae7f49..f7749ac0bb 100644 --- a/specification/_doc_ids/table.csv +++ b/specification/_doc_ids/table.csv @@ -165,6 +165,7 @@ data-stream-update,https://www.elastic.co/docs/api/doc/elasticsearch/operation/o data-streams,https://www.elastic.co/docs/manage-data/data-store/data-streams, date-index-name-processor,https://www.elastic.co/docs/reference/enrich-processor/date-index-name-processor, dcg,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/search-rank-eval#_discounted_cumulative_gain_dcg, +deepseek-api-keys,https://api-docs.deepseek.com/, defining-roles,https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/defining-roles, delete-analytics-collection,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-delete-behavioral-analytics,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-analytics-collection.html delete-async-sql-search-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-delete-async,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-async-sql-search-api.html @@ -925,4 +926,4 @@ watcher-api-update-settings,https://www.elastic.co/docs/api/doc/elasticsearch/op watsonx-api-keys,https://cloud.ibm.com/iam/apikeys, watsonx-api-models,https://www.ibm.com/products/watsonx-ai/foundation-models, watsonx-api-version,https://cloud.ibm.com/apidocs/watsonx-ai#active-version-dates, -xpack-rollup,https://www.elastic.co/docs/manage-data/lifecycle/rollup, \ No newline at end of file +xpack-rollup,https://www.elastic.co/docs/manage-data/lifecycle/rollup, From b58149481c9696d51bfab9d0537b053b14f4e79d Mon Sep 17 00:00:00 2001 From: Pat Whelan Date: Mon, 30 Jun 2025 08:26:50 -0400 Subject: [PATCH 3/4] Rerun make validate --- output/schema/schema.json | 1 + 1 file changed, 1 insertion(+) diff --git a/output/schema/schema.json b/output/schema/schema.json index 764171842c..678c70fe7a 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -164409,6 +164409,7 @@ { "description": "A valid API key for your DeepSeek account.\nYou can find or create your DeepSeek API keys on the DeepSeek API key page.\n\nIMPORTANT: You need to provide the API key only once, during the inference model creation.\nThe get inference endpoint API does not retrieve your API key.\nAfter creating the inference model, you cannot change the associated API key.\nIf you want to use a different API key, delete the inference model and recreate it with the same name and the updated API key.", "extDocId": "deepseek-api-keys", + "extDocUrl": "https://api-docs.deepseek.com/", "name": "api_key", "required": true, "type": { From a8704efd86b23422e36864011d65bdc47278675c Mon Sep 17 00:00:00 2001 From: Pat Whelan Date: Mon, 30 Jun 2025 14:33:41 -0400 Subject: [PATCH 4/4] run make spec-format-fix --- .../put_deepseek/request/PutDeepSeekRequestExample1.yaml | 6 +++--- .../put_deepseek/request/PutDeepSeekRequestExample2.yaml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/specification/inference/put_deepseek/request/PutDeepSeekRequestExample1.yaml b/specification/inference/put_deepseek/request/PutDeepSeekRequestExample1.yaml index 616dcf07ce..997f000c01 100644 --- a/specification/inference/put_deepseek/request/PutDeepSeekRequestExample1.yaml +++ b/specification/inference/put_deepseek/request/PutDeepSeekRequestExample1.yaml @@ -65,9 +65,9 @@ alternatives: ]); - language: curl code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"service\":\"deepseek\",\"service_settings\":{\"api_key\":\"DeepSeek-Api-key\",\"model_id\":\"deepseek-chat\" - }' \"$ELASTICSEARCH_URL/_inference/completion/deepseek-completion\"" + 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d + ''{"service":"deepseek","service_settings":{"api_key":"DeepSeek-Api-key","model_id":"deepseek-chat" + }'' "$ELASTICSEARCH_URL/_inference/completion/deepseek-completion"' - language: Java code: > client.inference().put(p -> p diff --git a/specification/inference/put_deepseek/request/PutDeepSeekRequestExample2.yaml b/specification/inference/put_deepseek/request/PutDeepSeekRequestExample2.yaml index da393069a6..47499b2d4a 100644 --- a/specification/inference/put_deepseek/request/PutDeepSeekRequestExample2.yaml +++ b/specification/inference/put_deepseek/request/PutDeepSeekRequestExample2.yaml @@ -65,9 +65,9 @@ alternatives: ]); - language: curl code: - "curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d - '{\"service\":\"deepseek\",\"service_settings\":{\"api_key\":\"DeepSeek-Api-key\",\"model_id\":\"deepseek-chat\" - }' \"$ELASTICSEARCH_URL/_inference/chat_completion/deepseekdeepseek-chat-completion\"" + 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d + ''{"service":"deepseek","service_settings":{"api_key":"DeepSeek-Api-key","model_id":"deepseek-chat" + }'' "$ELASTICSEARCH_URL/_inference/chat_completion/deepseekdeepseek-chat-completion"' - language: Java code: > client.inference().put(p -> p