Image Read 操作の設定
Image read 操作では、プロンプトに基づいて画像を読み取って解釈します。現在、MuleSoft AI Chain Connector では OpenAI 画像モデルのみがサポートされています。
Image read 操作を設定する手順は、次のとおりです。
Unresolved include directive in modules/ROOT/pages/configuring-image-generation-operations.adoc - include::connectors::partial$t-configure-operations.adoc[] * Data
+ 操作のプロンプトを含めます。 * ContextUrl
+ 読み取る画像ファイルへの URL を含めます。
この操作の XML 設定を次に示します。
<ms-aichain:image-read
doc:name="Image read"
doc:id="16cac2ce-def9-41e2-aaff-0f9c33d622f1"
config-ref="MuleSoft_AI_Chain_Config"
contextURL="#[payload.imageUrl]">
<ms-aichain:data><![CDATA[#[payload.prompt]]]></ms-aichain:data>
</ms-aichain:image-read>
出力設定
この操作の応答には、メイン LLM 応答を含む JSON ペイロードが含まれます。また、トークン利用状況などの属性がメインペイロード内ではなくメタデータ (属性) の一部として含まれます。
JSON ペイロードの応答例を次に示します。
{
"response": "The image depicts a group of men in what appears to be a stadium or arena setting. They are standing in the stands, with some looking agitated or engaged in a discussion."
}
操作では、JSON ペイロードに加えて、トークン利用状況に関する情報が含まれる属性も返されます。次に例を示します。
{
"attributes": {
"tokenUsage": {
"outputCount": 87,
"totalCount": 187,
"inputCount": 100
},
"additionalAttributes": {}
}
}
Image Generate 操作の設定
Image generate 操作では、LLM に送信されたプロンプトに基づいて画像を生成します。現在、MuleSoft AI Chain Connector では OpenAI 画像モデルのみがサポートされています。
Image generate 操作を設定する手順は、次のとおりです。
-
Studio キャンバスで操作を選択します。
-
[General (一般)] プロパティセクションで、画像を生成するためのプロンプト (
payload.prompt など) を使用して [Data (データ)] 項目を設定します。
この操作の XML 設定を次に示します。
<ms-aichain:image-generate
doc:name="Image generate"
doc:id="a057ad09-533f-42e9-bfd6-00014db6cec8"
config-ref="MuleSoft_AI_Chain_Config">
<ms-aichain:data><![CDATA[#[payload.prompt]]]></ms-aichain:data>
</ms-aichain:image-generate>