---
schema_version: "1"
id: 856f8506d6b87dcbba636ae6feaf9d8962e15432b3242612c54d642664dc4601
title: センチメント操作の設定
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/mulesoft-ai-chain-connector/1.0/configuring-sentiment-operations.md
canonical_url: https://docs.mulesoft.com/jp/mulesoft-ai-chain-connector/1.0/configuring-sentiment-operations
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 6c331b2d4c052b8a3e68f42c16f3e94d444d035ce2bf3f5df07cd14eb6aabd35
description: MuleSoft Documentation Site
release: "1.0"
latest: true
---
# センチメント操作の設定

## [](#sentiment-analyzer-操作の設定)Sentiment Analyzer 操作の設定

**Sentiment analyzer**​ 操作を使用して、設定済み LLM に簡単なプロンプト要求を送信します。この操作はプレーンテキストプロンプトを入力として使用し、その応答には入力テキストのセンチメントが含まれます。センチメントの値は、NEUTRAL、POSITIVE、または NEGATIVE です。

**Sentiment analyzer**​ 操作を設定する手順は、次のとおりです。

1. Studio キャンバスで操作を選択します。
2. **\[General (一般)\]**​ プロパティセクションで、センチメントを分析するプレーンテキストを ​**\[Prompt (プロンプト)\]**​ 項目に入力します。

この操作の XML 設定を次に示します。

```xml
<ms-aichain:sentiment-analyze
  doc:name="Sentiment analyze"
  doc:id="cad4ef27-5c85-47f7-a68c-f666809b0846"
  config-ref="MAC_AI_Llm_configuration"
  data="#[payload.inputText]"
/>
```

### [](#出力設定)出力設定

この操作の応答には、入力テキストのセンチメントを含む JSON ペイロードが含まれます。また、トークン利用状況やセンチメントの詳細などの属性がメインペイロード内ではなくメタデータ (属性) の一部として含まれます。

JSON ペイロードの応答例を次に示します。

```json
{
    "response": "POSITIVE"
}
```

操作では、JSON ペイロードに加えて、トークン利用状況に関する情報が含まれる属性が返されます。次に例を示します。

```json
{
  "tokenUsage": {
      "outputCount": 2,
      "totalCount": 39,
      "inputCount": 37
  },
  "additionalAttributes": {
      "isPositive": "false"
  }
}
```

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

- [Using Anypoint Code Builder to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb)
- [Studio を使用したコネクタの設定](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio)
- [MuleSoft AI Chain Connector の概要](https://docs.mulesoft.com/jp/mulesoft-ai-chain-connector/1.0/)
- [MuleSoft AI Chain Connector リファレンス](https://docs.mulesoft.com/jp/mulesoft-ai-chain-connector/1.0/mulesoft-ai-chain-connector-reference)
- [MuleSoft ヘルプセンター](https://help.mulesoft.com)