---
schema_version: "1"
id: bcf15ba2d037626eb3ef613164cbf2e43bfe036a7c950fa3fee97764e82f0087
title: Anypoint Code Builder を使用した MuleSoft AI Chain Connector の設定
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/mulesoft-ai-chain-connector/1.0/mulesoft-ai-chain-connector-config-acb.md
canonical_url: https://docs.mulesoft.com/jp/mulesoft-ai-chain-connector/1.0/mulesoft-ai-chain-connector-config-acb
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 60eb97db00306c0fb950248e6ce16a804397048e11d1d549afbd3d0dbe74895f
description: MuleSoft Documentation Site
release: "1.0"
latest: true
---
# Anypoint Code Builder を使用した MuleSoft AI Chain Connector の設定

Unresolved include directive in modules/ROOT/pages/mulesoft-ai-chain-connector-config-acb.adoc - include::connectors::partial$configure-acb-connectors-partial.adoc\[\]

## [](#create-new-integration-project)新しいインテグレーションプロジェクトを作成する

Unresolved include directive in modules/ROOT/pages/mulesoft-ai-chain-connector-config-acb.adoc - include::connectors::partial$configure-acb-connectors-partial.adoc\[\]

## [](#add-components-to-project)プロジェクトにコンポーネントを追加する

Unresolved include directive in modules/ROOT/pages/mulesoft-ai-chain-connector-config-acb.adoc - include::connectors::partial$configure-acb-connectors-partial.adoc\[\]

## [](#configure-http-trigger)フローのトリガーを設定する

Unresolved include directive in modules/ROOT/pages/mulesoft-ai-chain-connector-config-acb.adoc - include::connectors::partial$configure-acb-connectors-partial.adoc\[\]

## [](#add-connector-to-project)インテグレーションプロジェクトにコネクタを追加する

1. \[Explorer\] ビューで、目的のプロジェクトの設定 XML ファイル (​`my-project-name.xml`​ など) を開きます。
2. キャンバス UI が自動的に開かない場合は、アクティビティバーの ​![Show Mule graphical mode (Mule グラフィカルモードを表示)](/mulesoft/current/ja-jp/anypoint-code-builder/_images/icon-tree-view.png)​ (​**Show Mule graphical mode (Mule グラフィカルモードを表示)**​) アイコンをクリックしてキャンバス UI を開きます。
3. キャンバス UI から他のコンポーネントを追加した方法と同じ方法でコネクタを追加します。
    
    1. キャンバス UI で ​!["\[Add component (コンポーネントを追加)](/mulesoft/current/ja-jp/anypoint-code-builder/_images/icon-plus.png) アイコン",15,15\]​ (​**\[Add component (コンポーネントを追加)\]**​) アイコンをクリックします。
    2. **\[Add Component (コンポーネントを追加)\]**​ パネルで ​**\[Connectors (コネクタ)\]**​ をクリックします。
4. !["\[Search in Exchange (Exchange 内を検索)](/mulesoft/current/ja-jp/anypoint-code-builder/_images/icon-search-exchange.png) アイコン",15,15\]​ (​**\[Search in Exchange (Exchange 内を検索)\]**​) 切り替えをクリックします。
    
    !["\[Search in Exchange (Exchange 内を検索)](/mulesoft/current/ja-jp/anypoint-code-builder/_images/int-connector-search-exchange.png) 切り替え"\]
5. 検索ボックスに「​`mulesoft ai chain`​」と入力します。
6. コネクタを選択してプロジェクトに追加します。

コネクタをインテグレーションプロジェクトに追加しても、Anypoint Code Builder ワークスペースの他のプロジェクトはそのコネクタを使用できません。

## [](#add-global-config)グローバル設定を追加する

1. 設定 XML で、​`<flow/>`​ 要素の前にカーソルを置いて​`「ms-aichain」`​と入力します。
    
    カーソルが ​`<flow/>`​ 要素の内側にないことを確認します。
2. `ms-aichain:config`​ スニペットを選択します。
    
    このスニペットでは次のコードが追加されます。
    
    ```xml
    <ms-aichain:config llmType="#[]" configType="#[]" filePath="#[]" modelName="#[]" name="name" />
    ```
3. 属性を追加して設定を完了します。次に例を示します。
    
    ```xml
    <ms-aichain:config configType="Environment Variables" filePath="-" llmType="OPENAI" modelName="gpt-4o" name="MuleSoft_AI_Chain_Config">
    </ms-aichain:config>
    ```
    
    この例は、2 つのグローバル要素 (​`http:listener-config`​ と ​`ms-aichain:config`​) が定義されている「Define\_Prompt」という名前のフローを示しています。
    
    ```xml
     <http:listener-config basePath="/path" name="HTTP-Listener-config">
        <http:listener-connection host="0.0.0.0" port="8081">
        </http:listener-connection>
      </http:listener-config>
      <ms-aichain:config configType="Environment Variables" filePath="-" llmType="OPENAI" modelName="gpt-4o" name="MuleSoft_AI_Chain_Config"></ms-aichain:config>
      <flow name="Define_Prompt">
    ```

## [](#その他のコネクタ項目の設定)その他のコネクタ項目の設定

コネクタのグローバル要素を設定したら、他の必須項目を設定します。必須項目は、使用するコネクタアクションによって異なります。

MuleSoft AI Chain Connector アクションの設定についての詳細は、​[「MuleSoft AI Chain Connector - 追加設定情報」](https://docs.mulesoft.com/jp/mulesoft-ai-chain-connector/1.0/mulesoft-ai-chain-additional-config)​を参照してください。

## [](#関連情報)関連情報

- [Anypoint Connector の概要](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [MuleSoft AI Chain Connector リファレンス](https://docs.mulesoft.com/jp/mulesoft-ai-chain-connector/1.0/mulesoft-ai-chain-connector-reference)
- [MuleSoft AI Chain - 追加設定情報](https://docs.mulesoft.com/jp/mulesoft-ai-chain-connector/1.0/mulesoft-ai-chain-additional-config)
- [MuleSoft ヘルプセンター](https://help.mulesoft.com)