Skip to content

Commit a49228b

Browse files
authored
[DOCS] Documents completion task type for the AlibabaCloud AI Searc inference service. (elastic#113845) (elastic#113851)
1 parent 0d702c3 commit a49228b

File tree

2 files changed

+56
-22
lines changed

2 files changed

+56
-22
lines changed

docs/reference/inference/put-inference.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ The following services are available through the {infer} API.
5858
You can find the available task types next to the service name.
5959
Click the links to review the configuration details of the services:
6060

61-
* <<infer-service-alibabacloud-ai-search,AlibabaCloud AI Search>> (`rerank`, `sparse_embedding`, `text_embedding`)
61+
* <<infer-service-alibabacloud-ai-search,AlibabaCloud AI Search>> (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)
6262
* <<infer-service-amazon-bedrock,Amazon Bedrock>> (`completion`, `text_embedding`)
6363
* <<infer-service-anthropic,Anthropic>> (`completion`)
6464
* <<infer-service-azure-ai-studio,Azure AI Studio>> (`completion`, `text_embedding`)

docs/reference/inference/service-alibabacloud-ai-search.asciidoc

Lines changed: 55 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ include::inference-shared.asciidoc[tag=task-type]
2424
--
2525
Available task types:
2626

27-
* `text_embedding`,
27+
* `completion`,
28+
* `rerank`
2829
* `sparse_embedding`,
29-
* `rerank`.
30+
* `text_embedding`.
3031
--
3132

3233
[discrete]
@@ -55,31 +56,43 @@ A valid API key for the AlibabaCloud AI Search API.
5556
The name of the model service to use for the {infer} task.
5657
+
5758
--
58-
Available service_ids for the `text_embedding` task:
59+
Available service_ids for the `completion` task:
5960

60-
* `ops-text-embedding-001`
61-
* `ops-text-embedding-zh-001`
62-
* `ops-text-embedding-en-001`
63-
* `ops-text-embedding-002`
61+
* `ops-qwen-turbo`
62+
* `qwen-turbo`
63+
* `qwen-plus`
64+
* `qwen-max`
65+
÷ `qwen-max-longcontext`
6466

65-
For the supported `text_embedding` service_ids, refer to the https://help.aliyun.com/zh/open-search/search-platform/developer-reference/text-embedding-api-details[documentation].
67+
For the supported `completion` service_ids, refer to the https://help.aliyun.com/zh/open-search/search-platform/developer-reference/text-generation-api-details[documentation].
68+
69+
Available service_id for the `rerank` task is:
70+
71+
* `ops-bge-reranker-larger`
72+
73+
For the supported `rerank` service_id, refer to the https://help.aliyun.com/zh/open-search/search-platform/developer-reference/ranker-api-details[documentation].
6674

6775
Available service_id for the `sparse_embedding` task:
6876

6977
* `ops-text-sparse-embedding-001`
7078

7179
For the supported `sparse_embedding` service_id, refer to the https://help.aliyun.com/zh/open-search/search-platform/developer-reference/text-sparse-embedding-api-details[documentation].
7280

73-
Available service_id for the `rerank` task is:
81+
Available service_ids for the `text_embedding` task:
7482

75-
* `ops-bge-reranker-larger`
83+
* `ops-text-embedding-001`
84+
* `ops-text-embedding-zh-001`
85+
* `ops-text-embedding-en-001`
86+
* `ops-text-embedding-002`
87+
88+
For the supported `text_embedding` service_ids, refer to the https://help.aliyun.com/zh/open-search/search-platform/developer-reference/text-embedding-api-details[documentation].
7689

77-
For the supported `rerank` service_id, refer to the https://help.aliyun.com/zh/open-search/search-platform/developer-reference/ranker-api-details[documentation].
7890
--
7991

8092
`host`:::
8193
(Required, string)
82-
The name of the host address used for the {infer} task. You can find the host address at https://opensearch.console.aliyun.com/cn-shanghai/rag/api-key[ the API keys section] of the documentation.
94+
The name of the host address used for the {infer} task.
95+
You can find the host address at https://opensearch.console.aliyun.com/cn-shanghai/rag/api-key[the API keys section] of the documentation.
8396

8497
`workspace`:::
8598
(Required, string)
@@ -130,25 +143,43 @@ If `true`, the token name will be returned in the response. Defaults to `false`
130143
[[inference-example-alibabacloud-ai-search]]
131144
==== AlibabaCloud AI Search service examples
132145

133-
The following example shows how to create an {infer} endpoint called `alibabacloud_ai_search_embeddings` to perform a `text_embedding` task type.
146+
The following example shows how to create an {infer} endpoint called `alibabacloud_ai_search_completion` to perform a `completion` task type.
134147

135148
[source,console]
136149
------------------------------------------------------------
137-
PUT _inference/text_embedding/alibabacloud_ai_search_embeddings
150+
PUT _inference/completion/alibabacloud_ai_search_completion
151+
{
152+
"service": "alibabacloud-ai-search",
153+
"service_settings": {
154+
"host" : "default-j01.platform-cn-shanghai.opensearch.aliyuncs.com",
155+
"api_key": "{{API_KEY}}",
156+
"service_id": "ops-qwen-turbo",
157+
"workspace" : "default"
158+
}
159+
}
160+
------------------------------------------------------------
161+
// TEST[skip:TBD]
162+
163+
164+
The next example shows how to create an {infer} endpoint called `alibabacloud_ai_search_rerank` to perform a `rerank` task type.
165+
166+
[source,console]
167+
------------------------------------------------------------
168+
PUT _inference/rerank/alibabacloud_ai_search_rerank
138169
{
139170
"service": "alibabacloud-ai-search",
140171
"service_settings": {
141172
"api_key": "<api_key>",
142-
"service_id": "ops-text-embedding-001",
173+
"service_id": "ops-bge-reranker-larger",
143174
"host": "default-j01.platform-cn-shanghai.opensearch.aliyuncs.com",
144175
"workspace": "default"
145176
}
146177
}
147178
------------------------------------------------------------
148179
// TEST[skip:TBD]
149180

150-
The following example shows how to create an {infer} endpoint called
151-
`alibabacloud_ai_search_sparse` to perform a `sparse_embedding` task type.
181+
182+
The following example shows how to create an {infer} endpoint called `alibabacloud_ai_search_sparse` to perform a `sparse_embedding` task type.
152183

153184
[source,console]
154185
------------------------------------------------------------
@@ -165,20 +196,23 @@ PUT _inference/sparse_embedding/alibabacloud_ai_search_sparse
165196
------------------------------------------------------------
166197
// TEST[skip:TBD]
167198

168-
The next example shows how to create an {infer} endpoint called
169-
`alibabacloud_ai_search_rerank` to perform a `rerank` task type.
199+
200+
The following example shows how to create an {infer} endpoint called `alibabacloud_ai_search_embeddings` to perform a `text_embedding` task type.
170201

171202
[source,console]
172203
------------------------------------------------------------
173-
PUT _inference/rerank/alibabacloud_ai_search_rerank
204+
PUT _inference/text_embedding/alibabacloud_ai_search_embeddings
174205
{
175206
"service": "alibabacloud-ai-search",
176207
"service_settings": {
177208
"api_key": "<api_key>",
178-
"service_id": "ops-bge-reranker-larger",
209+
"service_id": "ops-text-embedding-001",
179210
"host": "default-j01.platform-cn-shanghai.opensearch.aliyuncs.com",
180211
"workspace": "default"
181212
}
182213
}
183214
------------------------------------------------------------
184215
// TEST[skip:TBD]
216+
217+
218+

0 commit comments

Comments
 (0)