Flex Gateway新着情報
Governance新着情報
Monitoring API Managerこれらの例は、MuleSoft Vectors Connector を使用する方法を示しています。
このフローでは、/store01 で HTTP 要求をリスンし、指定されたキーまたはデフォルトキーを使用して Amazon S3 バケットからファイルを取得し、そのコンテンツをテキストパーサーを使用してテキストに解析します。次に、テキストはより小さい重複チャンクに分割され、エンベディングモデルを使用してエンベディングに変換され、loadf02 という名前でベクトルストアに保存されます。
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd">
<flow name="vectordemo01julyFlow5" doc:id="21acd6e4-cc51-4532-8277-0fb44f88a7f2" >
<http:listener doc:name="Listener" doc:id="dd002e73-b0b4-4174-8a07-ca2b335ddff3" config-ref="HTTP_Listener_config" path="/store02" />
<set-variable value="#[attributes.queryParams.keyname default 'key3']" doc:name="Set Variable" doc:id="f2531d58-ddf7-4728-8729-8c57d9f437d5" variableName="key" />
<s3:get-object doc:name="Get Object" doc:id="af0724a0-380f-475c-9282-4f9c1fb08518" config-ref="Amazon_S3_Configuration" bucketName="bucket-amar" key="#[vars.key]"/>
<ms-vectors:transform-parse-document doc:name="[Transform] Parse document" doc:id="09159639-7dcb-499e-a133-f609e03cf94d" config-ref="MuleSoft_Vectors_Connector_Transform_config" >
<ms-vectors:document-parser-parameters >
<ms-vectors:multiformat-document-parser-parameters />
</ms-vectors:document-parser-parameters>
</ms-vectors:transform-parse-document>
<ms-vectors:transform-chunk-text doc:name="[Transform] Chunk text" doc:id="4ad439c1-c77e-4a1c-b1af-67f6846e66c9" maxSegmentSizeInChar="500" maxOverlapSizeInChars="10" />
<ms-vectors:embedding-generate-from-text embeddingModelName="sfdc_ai__DefaultAzureOpenAITextEmbeddingAda_002" doc:name="[Embedding] Generate from text" doc:id="6b02b772-b57c-4c4a-bb6c-6754f171b83a" config-ref="MuleSoft_Vectors_Connector_Embedding_config">
</ms-vectors:embedding-generate-from-text>
<ms-vectors:store-add doc:name="[Store] Add" doc:id="e8109f15-0589-4b67-8a0b-ba9c5911a8ae" config-ref="MuleSoft_Vectors_Connector_Store_config" storeName="loadf02" >
<ms-vectors:metadata-entries />
</ms-vectors:store-add>
</flow>
</mule>
このフローでは、/store02 で HTTP 要求をリスンし、指定されたキーまたはデフォルトキーを使用して Amazon S3 バケットから PDF を取得し、そのコンテンツをマルチフォーマットドキュメントパーサーを使用してテキストに解析します。次に、テキストはより小さい重複チャンクに分割され、エンベディングモデルを使用してエンベディングに変換され、loadf02 という名前でベクトルストアに保存されます。
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd">
<flow name="vectordemo01julyFlow5" doc:id="a048f363-b639-44ca-b068-baea0e2266e4" >
<http:listener doc:name="Listener" doc:id="11d2d9fe-46dc-41fd-baa1-0d55ed7c822c" config-ref="HTTP_Listener_config" path="/store02" />
<set-variable value="#[attributes.queryParams.keyname default 'key3']" doc:name="Set Variable" doc:id="6735365b-48eb-4ec8-a008-abb459064d1a" variableName="key" />
<s3:get-object doc:name="Get Object" doc:id="32412129-dce4-4352-8ee4-7f7e35012ffb" config-ref="Amazon_S3_Configuration" bucketName="bucket-amar" key="#[vars.key]"/>
<ms-vectors:transform-parse-document doc:name="[Transform] Parse document" doc:id="0e98a350-54f2-4db9-aaaf-2d83e7ebc7ce" config-ref="MuleSoft_Vectors_Connector_Transform_config" >
<ms-vectors:document-parser-parameters >
<ms-vectors:multiformat-document-parser-parameters />
</ms-vectors:document-parser-parameters>
</ms-vectors:transform-parse-document>
<ms-vectors:transform-chunk-text doc:name="[Transform] Chunk text" doc:id="6632401c-749d-4ccc-a688-d5e899e7909b" maxSegmentSizeInChar="500" maxOverlapSizeInChars="10" />
<ms-vectors:embedding-generate-from-text embeddingModelName="sfdc_ai__DefaultAzureOpenAITextEmbeddingAda_002" doc:name="[Embedding] Generate from text" doc:id="c59a5fa4-c659-4b37-ae2e-7871b30d00dc" config-ref="MuleSoft_Vectors_Connector_Embedding_config">
</ms-vectors:embedding-generate-from-text>
<ms-vectors:store-add doc:name="[Store] Add" doc:id="b1b5f72a-7c67-48c5-8828-d0073345517e" config-ref="MuleSoft_Vectors_Connector_Store_config" storeName="loadf02" >
<ms-vectors:metadata-entries />
</ms-vectors:store-add>
</flow>
</mule>