Skip to content

Commit 39df6df

Browse files
committed
Add inference.update
1 parent d6b91ac commit 39df6df

File tree

7 files changed

+343
-0
lines changed

7 files changed

+343
-0
lines changed

output/openapi/elasticsearch-openapi.json

Lines changed: 93 additions & 0 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: 121 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

Lines changed: 8 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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ indices-templates,https://www.elastic.co/guide/en/elasticsearch/reference/{branc
258258
indices-update-settings,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-update-settings.html
259259
infer-trained-model-deployment,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/infer-trained-model-deployment.html
260260
inference-api-stream,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/stream-inference-api.html
261+
inference-api-update,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-inference-api.html
261262
inference-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/inference-processor.html
262263
info-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/info-api.html
263264
ingest,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/ingest.html
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"inference.update": {
3+
"documentation": {
4+
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/update-inference-api.html",
5+
"description": "Update inference"
6+
},
7+
"stability": "stable",
8+
"visibility": "public",
9+
"headers": {
10+
"accept": ["application/json"],
11+
"content_type": ["application/json"]
12+
},
13+
"url": {
14+
"paths": [
15+
{
16+
"path": "/_inference/{inference_id}/_update",
17+
"methods": ["POST"],
18+
"parts": {
19+
"inference_id": {
20+
"type": "string",
21+
"description": "The inference Id"
22+
}
23+
}
24+
},
25+
{
26+
"path": "/_inference/{task_type}/{inference_id}/_update",
27+
"methods": ["POST"],
28+
"parts": {
29+
"task_type": {
30+
"type": "string",
31+
"description": "The task type"
32+
},
33+
"inference_id": {
34+
"type": "string",
35+
"description": "The inference Id"
36+
}
37+
}
38+
}
39+
]
40+
},
41+
"body": {
42+
"description": "The inference endpoint's task and service settings"
43+
}
44+
}
45+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import { InferenceEndpoint } from '@inference/_types/Services'
21+
import { TaskType } from '@inference/_types/TaskType'
22+
import { RequestBase } from '@_types/Base'
23+
import { Id } from '@_types/common'
24+
25+
/**
26+
* Update an inference endpoint.
27+
*
28+
* Modify `task_settings`, secrets (within `service_settings`), or `num_allocations` for an inference endpoint, depending on the specific endpoint service and `task_type`.
29+
*
30+
* IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face.
31+
* For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.
32+
* However, 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.
33+
* @rest_spec_name inference.update
34+
* @availability stack since=8.17.0 stability=stable visibility=public
35+
* @cluster_privileges manage_inference
36+
* @doc_id inference-api-update
37+
*/
38+
export interface Request extends RequestBase {
39+
path_parts: {
40+
/**
41+
* The unique identifier of the inference endpoint.
42+
*/
43+
inference_id: Id
44+
/**
45+
* The type of inference task that the model performs.
46+
*/
47+
task_type?: TaskType
48+
}
49+
/** @codegen_name inference_config */
50+
body: InferenceEndpoint
51+
}

0 commit comments

Comments
 (0)