メインコンテンツまでスキップ

Pipeline を作成 (V1)

ノート

Ingestion、Search、Deletion タイプの pipeline を作成します。

POST/v1/pipelines
接続エンドポイント

https://controller.api.${CLOUD_REGION}.zillizcloud.com

📘ノート
shell
export CLOUD_REGION="gcp-us-west1"
export BASE_URL="https://controller.api.${CLOUD_REGION}.zillizcloud.com"
パラメータ
Authorizationstringheader必要

認証トークンは、適切な権限を持つ API key である必要があります。

値の例: Bearer {{TOKEN}}
リクエスト・ボディ
namestring必要

作成する pipeline の名前です。pipeline 名は 3~64 文字の文字列で、英数字とアンダースコアのみを含めることができます。

descriptionstring

作成する pipeline の説明です。

typestring必要

作成する pipeline のタイプです。ingestion pipeline の場合、値は INGESTION にする必要があります。詳細については、Understanding pipelines を参照してください。

functionsarray必要

作成する ingestion pipeline に追加する function です。ingestion pipeline には 1 つだけの INDEX function が必要で、PRESERVE function は 0~50 個追加できます。

[]functionsoneOf

追加する function です。利用可能なオプションは次のとおりです。

追加する function です。

namestring必要

追加する function の名前です。function 名は 3~64 文字の文字列で、英数字とアンダースコアのみを含めることができます。

actionstring必要

追加する function のタイプです。text ingestion pipeline の場合、値は INDEX_TEXT または PRESERVE にする必要があります。

embeddingstring必要

ソースデータを vector embeddings に変換するために使用される embedding model の名前です。指定可能な値については、Which embedding model does Zilliz Cloud Pipelines use? を参照してください。

languagestring必要

ドキュメントの言語です。

追加する function です。

namestring必要

追加する function の名前です。function 名は 3~64 文字の文字列で、英数字とアンダースコアのみを含めることができます。

actionstring必要

追加する function のタイプです。doc ingestion pipeline の場合、値は INDEX_DOC または PRESERVE にする必要があります。

embeddingstring必要

ソースデータを vector embeddings に変換するために使用される embedding model の名前です。指定可能な値については、Which embedding model does Zilliz Cloud Pipelines use? を参照してください。

languagestring必要

ドキュメントの言語です。

chunkSizeinteger

分割された doc セグメントの最大サイズです。各 embedding model でサポートされる chunk size の範囲について詳しくは、Zilliz Cloud Limits を参照してください。

値の範囲: ≥ 20≤ 12000
splitByarray

指定されたドキュメントをより小さな chunk に分割するために Zilliz Cloud が使用する splitter です。デフォルト値は ["\n\n", "\n", " ", ""] です。

[]splitBystring

splitter です。

追加する function です。

namestring必要

追加する function の名前です。function 名は 3~64 文字の文字列で、英数字とアンダースコアのみを含めることができます。

actionstring必要

追加する function のタイプです。image ingestion pipeline の場合、値は INDEX_IMAGE または PRESERVE にする必要があります。

embeddingstring必要

ソースデータを vector embeddings に変換するために使用される embedding model の名前です。指定可能な値については、Which embedding model does Zilliz Cloud Pipelines use? を参照してください。

追加する function です。

namestring必要

追加する function の名前です。function 名は 3~64 文字の文字列で、英数字とアンダースコアのみを含めることができます。

actionstring必要

追加する function のタイプです。metadata を保持する ingestion pipeline の場合、値は PRESERVE にする必要があります。

inputFieldstring必要

必要に応じて input field に名前を付けます。ingestion pipeline の preserve function では、Zilliz Cloud はこの値を作成する collection 内の field 名として使用します。

outputFieldstring必要

output field の名前です。値は input_field と同じである必要があります。

fieldTypestring必要

ターゲット collection に作成する field のデータ型です。

clusterIdstring必要

pipeline が適用されるターゲット cluster の ID です。

collectionNamestring必要

pipeline が適用されるターゲット collection の名前です。Zilliz Cloud は、指定された名前の collection が存在するかどうかを確認します。collection が存在する場合、Zilliz Cloud はその collection 用の pipeline を作成します。存在しない場合、Zilliz Cloud は指定された名前で新しい collection を作成します。

projectIdstring必要

ターゲット cluster が属する project の ID です。

namestring必要

作成する pipeline の名前です。pipeline 名は 3~64 文字の文字列で、英数字とアンダースコアのみを含めることができます。

descriptionstring

作成する pipeline の説明です。

typestring必要

作成する pipeline のタイプです。search pipeline の場合、値は SEARCH にする必要があります。詳細については、Understanding pipelines を参照してください。

functionsarray必要

作成する search pipeline に追加する関数です。search pipeline には 1 つの関数しか設定できません。

[]functionsoneOf
(近日追加予定)

追加する function です。

namestring必要

追加する function の名前です。function 名は 3~64 文字の文字列で、英数字とアンダースコアのみを含めることができます。

actionstring必要

追加する function のタイプです。text search pipeline の場合、値は SEARCH_TEXT にする必要があります。

clusterIdstring必要

pipeline が適用されるターゲット cluster の ID です。

collectionNamestring必要

pipeline が適用されるターゲット collection の名前です。

embeddingstring必要

vector search で使用する embedding model です。互換性のある collection で選択された embedding model と一致している必要があります。詳細については、Which embedding model does Zilliz Cloud Pipelines use? を参照してください。

rerankerstring

検索結果の品質を向上させるために、一連の候補出力を順位付けする reranking model です。現在、指定可能な値は zilliz/bge-reranker-base のみです。詳細については、Reranker を参照してください。

追加する function です。

namestring必要

追加する function の名前です。function 名は 3~64 文字の文字列で、英数字とアンダースコアのみを含めることができます。

actionstring必要

追加する function のタイプです。doc search pipeline の場合、値は SEARCH_DOC_CHUNK にする必要があります。

clusterIdstring必要

pipeline が適用されるターゲット cluster の ID です。

collectionNamestring必要

pipeline が適用されるターゲット collection の名前です。

embeddingstring必要

ベクトル検索で使用する埋め込みモデルです。互換性のある collection で選択した埋め込みモデルと一致している必要があります。詳細は、Which embedding model does Zilliz Cloud Pipelines use? を参照してください。

rerankerstring

検索結果の品質を向上させるために、候補出力のセットを順位付けするために使用される reranking model です。現在、使用できる値は zilliz/bge-reranker-base のみです。詳細は、Reranker を参照してください。

追加する関数です。

namestring必要

追加する関数の名前です。関数名は 3~64 文字の文字列で、英数字とアンダースコアのみを含めることができます。

actionstring必要

追加する関数のタイプです。reverse image search pipeline の場合、値は SEARCH_IMAGE_BY_IMAGE にする必要があります。

clusterIdstring必要

pipeline が適用される対象 cluster の ID です。

collectionNamestring必要

pipeline が適用される対象 collection の名前です。

embeddingstring必要

ベクトル検索で使用する埋め込みモデルです。互換性のある collection で選択した埋め込みモデルと一致している必要があります。詳細は、Which embedding model does Zilliz Cloud Pipelines use? を参照してください。

rerankerstring

検索結果の品質を向上させるために、候補出力のセットを順位付けするために使用される reranking model です。現在、使用できる値は zilliz/bge-reranker-base のみです。詳細は、Reranker を参照してください。

追加する関数です。

namestring必要

追加する関数の名前です。関数名は 3~64 文字の文字列で、英数字とアンダースコアのみを含めることができます。

actionstring必要

追加する関数のタイプです。text-image search pipeline の場合、値は SEARCH_IMAGE_BY_TEXT にする必要があります。

clusterIdstring必要

pipeline が適用される対象 cluster の ID です。

collectionNamestring必要

pipeline が適用される対象 collection の名前です。

embeddingstring必要

ベクトル検索で使用する埋め込みモデルです。互換性のある collection で選択した埋め込みモデルと一致している必要があります。text-image search pipeline の場合、使用できる値は zilliz/clip-vit-base-patch32-multilingual-v1 のみです。詳細は、Which embedding model does Zilliz Cloud Pipelines use? を参照してください。

rerankerstring

検索結果の品質を向上させるために、候補出力のセットを順位付けするために使用される reranking model です。現在、使用できる値は zilliz/bge-reranker-base のみです。詳細は、Reranker を参照してください。

projectIdstring必要

対象 cluster が属する project の ID です。

namestring必要

作成する pipeline の名前です。pipeline 名は 3~64 文字の文字列で、英数字とアンダースコアのみを含めることができます。

descriptionstring必要

作成する pipeline の説明です。

typestring必要

作成する pipeline のタイプです。deletion pipeline の場合、値は DELETION にする必要があります。詳細は、Understanding pipelines を参照してください。

functionsarray必要

作成する deletion pipeline に追加する関数です。deletion pipeline には 1 つの関数しか設定できません。

[]functionsoneOf
(近日追加予定)
namestring必要

追加する関数の名前です。関数名は 3~64 文字の文字列で、英数字とアンダースコアのみを含めることができます。

actionstring必要

追加する関数のタイプです。text deletion pipeline の場合、値は PURGE_TEXT_INDEX または PURGE_BY_EXPRESSION にする必要があります。

namestring必要

追加する関数の名前です。関数名は 3~64 文字の文字列で、英数字とアンダースコアのみを含めることができます。

actionstring必要

追加する関数のタイプです。doc deletion pipeline の場合、値は PURGE_DOC_INDEX または PURGE_BY_EXPRESSION にする必要があります。

namestring必要

追加する関数の名前です。関数名は 3~64 文字の文字列で、英数字とアンダースコアのみを含めることができます。

actionstring必要

追加する関数のタイプです。image deletion pipeline の場合、値は PURGE_IMAGE_INDEX または PURGE_BY_EXPRESSION にする必要があります。

clusterIdstring必要

pipeline が適用される対象 cluster の ID です。

collectionNamestring必要

pipeline が適用される対象 collection の名前です。

projectIdstring必要

対象 cluster が属する project の ID です。

bash
export TOKEN="YOUR_API_KEY"

curl --request POST \
--url "${BASE_URL}/v1/pipelines" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"name": "my_text_ingestion_pipeline",
"clusterId": "inxx-xxxxxxxxxxxxxxx",
"projectId": "proj-xxxx",
"collectionName": "my_collection",
"description": "A pipeline that generates text embeddings and stores additional fields.",
"type": "INGESTION",
"functions": [
{
"name": "index_my_text",
"action": "INDEX_TEXT",
"language": "ENGLISH",
"embedding": "zilliz/bge-base-en-v1.5"
},
{
"name": "keep_text_info",
"action": "PRESERVE",
"inputField": "source",
"outputField": "source",
"fieldType": "VarChar"
}
]
}'
bash
export TOKEN="YOUR_API_KEY"

curl --request POST \
--url "${BASE_URL}/v1/pipelines" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"projectId": "proj-xxxx",
"name": "my_doc_ingestion_pipeline",
"description": "A pipeline that splits a doc file into chunks and generates embeddings. It also stores the publish_year with each chunk.",
"type": "INGESTION",
"functions": [
{
"name": "index_my_doc",
"action": "INDEX_DOC",
"language": "ENGLISH",
"chunkSize": 500,
"embedding": "zilliz/bge-base-en-v1.5",
"splitBy": [
"\n\n",
"\n",
" ",
""
]
},
{
"name": "keep_doc_info",
"action": "PRESERVE",
"inputField": "publish_year",
"outputField": "publish_year",
"fieldType": "Int16"
}
],
"clusterId": "inxx-xxxxxxxxxxxxxxx",
"newCollectionName": "my_collection"
}'
bash
export TOKEN="YOUR_API_KEY"

curl --request POST \
--url "${BASE_URL}/v1/pipelines" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"name": "my_image_ingestion_pipeline",
"clusterId": "inxx-xxxxxxxxxxxxxxx",
"projectId": "proj-xxxx",
"collectionName": "my_collection",
"description": "A pipeline that converts an image into vector embeddings and store in efficient index for search.",
"type": "INGESTION",
"functions": [
{
"name": "index_my_image",
"action": "INDEX_IMAGE",
"embedding": "zilliz/vit-base-patch16-224"
},
{
"name": "keep_image_tag",
"action": "PRESERVE",
"inputField": "image_title",
"outputField": "image_title",
"fieldType": "VarChar"
}
]
}'
レスポンス

作成された pipeline の情報を返します。

codeinteger

リクエストが成功したかどうかを示します。

dataobject

作成された ingestion pipeline の情報です。

pipelineIdinteger

pipeline の ID です。

namestring

pipeline の名前です。

typestring

pipeline のタイプです。ingestion pipeline の場合、値は INGESTION にする必要があります。

createTimestampinteger

pipeline が作成された時刻を示すタイムスタンプです。

descriptionstring

pipeline の説明です。

statusstring

pipeline の現在のステータスです。値が SERVING 以外の場合、pipeline は動作していません。

totalUsagearray

pipeline の総トークン使用量です。

[]totalUsageobject

pipeline の総トークン使用量の統計です。

embeddingstring

埋め込みモデルの総トークン使用量です。

functionsarray

pipeline 内の関数。ingestion pipeline には INDEX 関数が 1 つだけ必須で、PRESERVE 関数は 0~50 個まで設定できます。

[]functionsoneOf

pipeline 内の関数です。

text ingestion pipeline の関数です。

namestring

関数の名前です。

actionstring

関数のタイプです。text ingestion pipeline の場合、値は INDEX_TEXT または PRESERVE にする必要があります。

inputFieldsarray

必要に応じてフィールド名を指定します。text ingestion pipeline の場合、取り込むテキストのリストに使用します。

[]inputFieldsstring

入力フィールドです。

langaugestring

ソースデータの言語です。

embeddingstring

使用中の埋め込みモデルの名前です。

doc ingestion pipeline の関数。

namestring

関数の名前。

actionstring

関数のタイプ。doc ingestion pipeline の場合、値は INDEX_DOC または PRESERVE にする必要があります。

inputFieldstring

必要に応じてフィールドに名前を付けます。doc ingestion pipeline では、取り込む doc の pre-signed url に使用します。

langaugestring

ソースデータの言語。

chunkSizeinteger

分割されたドキュメントセグメントの最大サイズ。許可される chunk size の範囲は、使用する embedding model によって異なります。詳細については、Zilliz Cloud Limits を参照してください

embeddingstring

使用する embedding model の名前。

splitByarray

指定したドキュメントを Zilliz Cloud がより小さなチャンクに分割するためのスプリッター。値のデフォルトは ["\n\n", "\n", " ", ""] です。

[]splitBystring

スプリッター。

image ingestion pipeline の関数。

namestring

関数の名前。

actionstring

関数のタイプ。image ingestion pipeline の場合、値は INDEX_IMAGE または PRESERVE にする必要があります。

inputFieldsarray

必要に応じてフィールドに名前を付けます。image ingestion pipeline では、image_url は object storage bucket 内の pre-signed image URL を表し、image_id は画像 ID を表します。

[]inputFieldsstring

入力フィールド。

embeddingstring

使用する embedding model の名前。

メタデータを保持する ingestion pipeline の関数。

namestring

関数の名前。

actionstring

関数のタイプ。メタデータを保持する ingestion pipeline の場合、値は PRESERVE にする必要があります。

inputFieldstring

必要に応じてフィールドに名前を付けます。ingestion pipeline の PRESERVE 関数では、Zilliz Cloud はこの値を、作成する collection 内のフィールド名として使用します。

outputFieldstring

出力フィールドの名前。値は input_field と同じである必要があります。

fieldTypestring

ターゲット collection に作成するフィールドのデータ型。

CLUSTER_IDstring

pipeline が適用されるターゲット cluster。

collectionNamestring

pipeline が適用されるターゲット collection。

codeinteger

リクエストが成功したかどうかを示します。

dataobject

作成された search pipeline に関する情報。

pipelineIdinteger

pipeline ID。

namestring

pipeline の名前

typestring

pipeline のタイプ。search pipeline の場合、値は SEARCH にする必要があります。

descriptionstring

pipeline の説明。

statusstring

pipeline の現在のステータス。値が SERVING でない場合、その pipeline は動作していません。

totalUsagearray

pipeline の総 token 使用量。

[]totalUsageobject

pipeline の総 token 使用量に関する統計。

embeddingstring

embedding model の token 使用量。

rerankstring

reranker model の token 使用量。

functionsarray

pipeline 内の関数。search pipeline には 1 つの関数のみを含めることができます。

[]functionsoneOf

作成された pipeline 内の Function。

text search pipeline の関数。

namestring

関数の名前。

actionstring

関数のタイプ。text search pipeline の場合、値は SEARCH_TEXT にする必要があります。

inputFieldsarray

必要に応じてフィールドに名前を付けます。text search pipeline では、クエリテキスト (query_text) に使用します。

[]inputFieldsstring

入力フィールド。

embeddingstring

使用する embedding model。

rerankerstring

使用する reranking model。

collectionNamestring

pipeline が適用されるターゲット collection の名前。

clusterIdstring

pipeline が適用されるターゲット cluster の ID。

doc search pipeline の関数。

namestring

追加する関数の名前。関数名は 3~64 文字の文字列で、英数字とアンダースコアのみを含めることができます。

actionstring

追加する関数のタイプ。doc search pipeline の場合、値は SEARCH_DOC_CHUNK にする必要があります。

clusterIdstring

pipeline が適用されるターゲット cluster の ID。

collectionNamestring

pipeline が適用されるターゲット collection の名前。

embeddingstring

ベクトル検索で使用する embedding model。互換性のある collection で選択した embedding model と一致している必要があります。詳細については、Which embedding model does Zilliz Cloud Pipelines use? を参照してください。

rerankerstring

検索結果の品質を向上させるために、候補出力のセットを順位付けするための reranking model。現在、指定できる値は zilliz/bge-reranker-base のみです。詳細については、Reranker を参照してください。

inputFieldsarray

必要に応じてフィールドに名前を付けます。doc search pipeline の場合は、クエリテキスト (query_text) に使用します。

[]inputFieldsstring

入力フィールド。

reverse image search pipeline の関数。

namestring

追加する関数の名前。関数名は 3~64 文字の文字列で、英数字とアンダースコアのみを含めることができます。

actionstring

追加する関数のタイプ。reverse image search pipeline の場合、値は SEARCH_IMAGE_BY_IMAGE である必要があります。

clusterIdstring

pipeline が適用される対象クラスターの ID。

collectionNamestring

pipeline が適用される対象コレクションの名前。

embeddingstring

ベクトル検索で使用される embedding model。互換性のあるコレクションで選択した embedding model と一致している必要があります。詳細については、Which embedding model does Zilliz Cloud Pipelines use? を参照してください。

rerankerstring

使用中の reranker model。

inputFieldsarray

必要に応じてフィールドに名前を付けます。reverse image search pipeline の場合は、クエリ画像 URL (query_image_url) に使用します。

[]inputFieldsstring

入力フィールド。

image search pipeline の関数。

namestring

追加する関数の名前。関数名は 3~64 文字の文字列で、英数字とアンダースコアのみを含めることができます。

actionstring

追加する関数のタイプ。image search pipeline の場合、値は SEARCH_IMAGE_BY_TEXT である必要があります。

clusterIdstring

pipeline が適用される対象クラスターの ID。

collectionNamestring

pipeline が適用される対象コレクションの名前。

embeddingstring

ベクトル検索で使用される embedding model。互換性のあるコレクションで選択した embedding model と一致している必要があります。詳細については、Which embedding model does Zilliz Cloud Pipelines use? を参照してください。

rerankerstring

使用中の reranker model。

inputFieldsarray

必要に応じてフィールドに名前を付けます。text-image search pipeline の場合は、クエリテキスト (query_text) に使用します。

[]inputFieldsstring

入力フィールド。

codeinteger

リクエストが成功したかどうかを示します。

dataobject

作成された deletion pipeline に関する情報。

pipelineIdinteger

pipeline の ID。

namestring

pipeline の名前。

typestring

pipeline のタイプ。deletion pipeline の場合、値は DELETION である必要があります。

createTimestampinteger

pipeline が作成された時刻を示すタイムスタンプ。

descriptionstring

pipeline の説明。

statusstring

pipeline の現在のステータス。値が SERVING 以外の場合、pipeline は動作していません。

functionsarray

pipeline 内の関数。ingestion pipeline には 1 つだけの INDEX 関数が必須で、0~50 個の PRESERVE 関数を含めることができます。

[]functionsoneOf

pipeline 内の関数。

text deletion pipeline の関数。

namestring

関数の名前。

actionstring

関数のタイプ。text deletion pipeline の場合、値は PURGE_TEXT_INDEX または PURGE_BY_EXPRESSION である必要があります。

inputFieldsarray

必要に応じてフィールドに名前を付けます。text ingestion pipeline の場合は、削除するテキストの ID (id) または式 (expression) に使用します。

[]inputFieldsstring

入力フィールド。

doc deletion pipeline の関数。

namestring

関数の名前。

actionstring

関数のタイプ。doc deletion pipeline の場合、値は PURGE_DOC_INDEX または PURGE_BY_EXPRESSION である必要があります。

inputFieldsstring

必要に応じてフィールドに名前を付けます。doc deletion pipeline の場合は、削除する doc の名前 (doc_name) または式 (expression) に使用します。

image deletion pipeline の関数。

namestring

追加する関数の名前。関数名は 3~64 文字の文字列で、英数字とアンダースコアのみを含めることができます。

actionstring

追加する関数のタイプ。image deletion pipeline の場合、値は PURGE_IMAGE_INDEX または PURGE_BY_EXPRESSION である必要があります。

inputFieldsarray

必要に応じてフィールドに名前を付けます。image deletion pipeline では、削除する画像の ID (image_id) または式 (expression) に使用します。

[]inputFieldsstring

入力フィールド。

CLUSTER_IDstring

pipeline が適用される対象クラスター。

collectionNamestring

pipeline が適用される対象コレクション。

エラーメッセージを返します。

codeinteger

レスポンスコード。

messagestring

エラーメッセージ。

json
{
"code": 200,
"data": {
"pipelineId": "pipe-xxx",
"name": "my_text_ingestion_pipeline",
"type": "INGESTION",
"createTimestamp": 1721187300000,
"description": "A pipeline that generates text embeddings and stores additional fields.",
"status": "SERVING",
"totalUsage": {
"embedding": 0
},
"functions": [
{
"name": "index_my_text",
"action": "INDEX_TEXT",
"inputFields": [
"text_list"
],
"language": "ENGLISH",
"embedding": "zilliz/bge-base-en-v1.5"
},
{
"name": "keep_text_info",
"action": "PRESERVE",
"inputField": "source",
"outputField": "source",
"fieldType": "VarChar"
}
],
"clusterId": "inxx-xxxx",
"collectionName": "my_collection"
}
}
json
{
"code": 200,
"data": {
"pipelineId": "pipe-xxxx",
"name": "my_doc_ingestion_pipeline",
"type": "INGESTION",
"createTimestamp": 1721187300000,
"description": "A pipeline that splits a doc file into chunks and generates embeddings. It also stores the publish_year with each chunk.",
"status": "SERVING",
"totalUsage": {
"embedding": 0
},
"functions": [
{
"action": "INDEX_DOC",
"name": "index_my_doc",
"inputField": "doc_url",
"language": "ENGLISH",
"chunkSize": 500,
"embedding": "zilliz/bge-base-en-v1.5",
"splitBy": [
"\n\n",
"\n",
" ",
""
]
},
{
"action": "PRESERVE",
"name": "keep_doc_info",
"inputField": "publish_year",
"outputField": "publish_year",
"fieldType": "Int16"
}
],
"clusterId": "in03-***************",
"collectionName": "my_collection"
}
}
json
{
"code": 200,
"data": {
"pipelineId": "pipe-xxxx",
"name": "my_image_ingestion_pipeline",
"type": "INGESTION",
"createTimestamp": 1721187300000,
"clusterId": "in03-***************",
"collectionName": "my_collection",
"description": "A pipeline that converts an image into vector embeddings and store in efficient index for search.",
"status": "SERVING",
"totalUsage": {
"embedding": 0
},
"functions": [
{
"action": "INDEX_IMAGE",
"name": "index_my_image",
"inputFields": [
"image_url",
"image_id"
],
"embedding": "zilliz/vit-base-patch16-224"
},
{
"action": "PRESERVE",
"name": "keep_image_tag",
"inputField": "image_title",
"outputField": "image_title",
"fieldType": "VarChar"
}
]
}
}