运行 Pipeline即将作废
This runs a specific pipeline.
该 API 的 Base URL 格式如下:
https://controller.api.${CLOUD_REGION}.zilliz.com.cn
- 你需要将
${CLOUD_REGION}
替换为您的集群所在区域。 - 获取云区域 ID 请参考 Zilliz Cloud 控制台 或使用查看云区域接口。
export CLOUD_REGION="ali-cn-hangzhou"
export BASE_URL="https://controller.api.${CLOUD_REGION}.zilliz.com.cn"
认证令牌,应为具备适当权限的 API 密钥。
从列表 Pipeline API 端点或 Zilliz Cloud 控制台获取的有效 Pipeline ID。
数据摄取参数。
存放在对象存储中的文件 URL。应使用不编码或编码为 UTF-8 的 URL。请确保 URL 在至少一小时内有效。
需要插入的元数据字段。字段名称需与创建当前 Ingestion Pipeline 时通过 PRESERVE 函数定义的字段保持一致。该字段的值需遵循预定义的字段类型。
需要插入的文本或文本列表。
需要插入的元数据字段。字段名称需与创建当前 Ingestion Pipeline 时通过 PRESERVE 函数定义的字段保持一致。该字段的值需遵循预定义的字段类型。
存放在对象存储中的图片 URL。应使用不编码或编码为 UTF-8 的 URL。请确保 URL 在至少一小时内有效。
存放在对象存储中的图片 ID。
图片名称。
检索数据。
查询字符串。Zilliz Cloud 会将其转换成对应的向量表示,并在目标 Collection 中进行搜索。适用于 SEARCHTEXT、SEARCHDOCCHUNK 或 SEARCHIMAGEBYTEXT 类型的 Pipeline。
查询图片在对象存储中的 URL。适用于 SEARCHIMAGEBY_IMAGE 类型的 Pipeline。
检索参数。
需返回的记录数量。
在检索结果中需跳过的记录数量。
检索结果中的每条匹配记录需要包含的元数据字段。
在创建当前 Pipeline 时通过 PRESERVE 函数定义的有效输出字段。
Zilliz Cloud 用于过滤记录的布尔表达式。
删除 Pipeline 请求的负载。
用于过滤记录的布尔表达式。适用于 INDEX_TEXT 类型的 Pipeline。
待删除的文档名称。您可以根据文档名称删除文档,这会删除该文档的所有分块。适用于 INDEXDOCCHUNK 类型的 Pipeline。
图片 ID。适用于 INDEX_IMAGE 类型的 Pipeline。
export TOKEN="YOUR_API_KEY"
export PIPELINE_ID="pipe-xxxxxxxxxxxxxxxxx"
curl --request POST \
--url "${BASE_URL}/v1/pipeline/${PIPELINE_ID}/run" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Content-Type: application/json" \
-d '{
"data": {
"text_list": [
"Zilliz Cloud is a fully managed vector database and data services, empowering you to unlock the full potential of unstructured data for your AI applications.",
"It can store, index, and manage massive embedding vectors generated by deep neural networks and other machine learning (ML) models."
],
"source": "Zilliz official website"
}
}'
export TOKEN="YOUR_API_KEY"
export PIPELINE_ID="pipe-xxxxxxxxxxxxxxxxx"
curl --request POST \
--url "${BASE_URL}/v1/pipeline/${PIPELINE_ID}/run" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Content-Type: application/json" \
-d '{
"data": {
"doc_url": "https://storage.googleapis.com/example-bucket/zilliz_concept_doc.md?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=example%40example-project.iam.gserviceaccount.com%2F20181026%2Fus-central1%2Fstorage%2Fgoog4_request&X-Goog-Date=20181026T181309Z&X-Goog-Expires=900&X-Goog-SignedHeaders=host&X-Goog-Signature=247a2aa45f169edf4d187d54e7cc46e4731b1e6273242c4f4c39a1d2507a0e58706e25e3a85a7dbb891d62afa8496def8e260c1db863d9ace85ff0a184b894b117fe46d1225c82f2aa19efd52cf21d3e2022b3b868dcc1aca2741951ed5bf3bb25a34f5e9316a2841e8ff4c530b22ceaa1c5ce09c7cbb5732631510c20580e61723f5594de3aea497f195456a2ff2bdd0d13bad47289d8611b6f9cfeef0c46c91a455b94e90a66924f722292d21e24d31dcfb38ce0c0f353ffa5a9756fc2a9f2b40bc2113206a81e324fc4fd6823a29163fa845c8ae7eca1fcf6e5bb48b3200983c56c5ca81fffb151cca7402beddfc4a76b133447032ea7abedc098d2eb14a7",
"publish_year": 2023
}
}'
export TOKEN="YOUR_API_KEY"
export PIPELINE_ID="pipe-xxxxxxxxxxxxxxxxx"
curl --request POST \
--url "${BASE_URL}/v1/pipeline/${PIPELINE_ID}/run" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Content-Type: application/json" \
-d '{
"data": {
"image_id": "my-img-123456",
"image_url": "xxx",
"image_title": "A cute yellow cat"
}
}'
响应码。
响应负载。
当 Pipeline 为 Text Ingestion 类型时的返回结果。
已添加到目标 Collection 中的文本字符串数量。
已添加到目标 Collection 中的文本字符串对应的 Entity ID。
已添加到目标 Collection 中的某个文本字符串对应的 Entity ID。
Token 使用统计信息。
将文本字符串转换为向量表示所使用的 token 数量。
响应负载。
文件分块数量。
分块所属文件名称(带扩展名)。
Token 使用统计。
将文件分场转换成向量表示所使用的 token 数量。
当 Pipeline 为 Image Ingestion 类型时的返回结果。
已添加的图片数量。
Token 使用统计信息。
将图片转换为向量表示所使用的 token 数量。
响应码。
响应负载。
当 Pipeline 为 Search 类型时的返回结果。
返回文档 Pipeline 检索结果,为一个对象数组。
返回文本 Pipeline 检索结果,为一个对象数组。
返回图片 Pipeline 检索结果,为一个对象数组。
Token 使用统计。
将查询字符串转换成向量表示所使用的 token 数量。
对检索结果重新排序所使用的 token 数量。
响应码。
当 Pipeline 为 Deletion 类型时的返回结果。
已删除文档。如果删除 Pipeline 中携带了某个文档名称,Zilliz Cloud 会删除该文档的所有分块。
已删除 Entity 数量。
返回错误消息。
响应码。
错误描述。
{
"code": 200,
"data": {
"num_entities": 2,
"usage": {
"embedding": 63
},
"ids": [
450524927755105900,
450524927755105900
]
}
}
{
"code": 200,
"data": {
"doc_name": "zilliz_concept_doc.md",
"usage": {
"embedding": 1241
},
"num_chunks": 3
}
}
{
"code": 200,
"data": {
"num_entities": 1,
"usage": {
"embedding": 1
}
}
}