システムツールは、エージェントが一般的なタスクを実行するために使用できる組み込みツールです。編集はできません。
他のツールと同様に、システムツールを使用する場合は、ツールを使用するタイミングに関するエージェントの手順とツール引数を指定します。
customize_response
割り込みと DTMF パラメータの無効化など、パラメータをきめ細かく制御してエージェントの音声レスポンスを生成します。
引数:
| 引数 | 必須 / 省略可 | 説明 | デフォルト |
|---|---|---|---|
| コンテンツ | 必須 | エージェントのレスポンスのテキスト コンテンツ。 | |
| enable_dtmf | 省略可 | キーボード入力(DTMF)を有効にするかどうか。 | エージェント アプリケーションの設定によって決定されます |
| dtmf_endpointing_timeout_modes | 省略可 | ユーザーが入力して返信するまでの待ち時間。[短い]、[中]、[長い] から選択します。 | "mid" |
| dtmf_finish_digit | 省略可 | DTMF 収集を終了する DTMF ディジット。例: 「#」。 | 空の文字列 |
| disable_barge_in | 省略可 | エージェントが話しているときにユーザーが割り込むことを禁止します。 | False |
DTMF を使用して電話番号を収集する手順の例。DTMF が明示的に有効にされており、エージェント アプリケーションの設定がオーバーライドされる可能性があります。
make the tool call customize_response(content="Please type your phone number",
enable_dtmf=True,
dtmf_endpointing_timeout_modes='short')
または、enable_dtmf を False に明示的に設定することも、この引数を省略してエージェント アプリケーションの設定に依存することもできます。
DTMF でクレジット カード番号を収集する手順の例:
make the tool call customize_response(
content="Using your keypad, please enter your 16-digit credit card number, then press the pound key when you are finished.",
enable_dtmf=True,
dtmf_finish_digit='#',
dtmf_endpointing_timeout_modes='mid')
割り込みを許可せずに利用規約を読み上げる指示の例:
make the tool call customize_response(
content="By proceeding, you agree to the terms and condition...",
disable_barge_in=True)
end_session
セッションを終了します。このツールは、会話を終了して人間のエージェントにエスカレーションするか、ユーザーにリクエストがなくなった場合にセッションを終了するために使用されます。
問題が原因でセッションが終了し、ユーザーをエスカレーションする必要があった場合は、session_escalated パラメータに True の値を指定します。params 引数を使用して、最終レスポンスのセッション終了メタデータにデータを転送します。
引数:
| 引数 | 必須 / 省略可 | 説明 | デフォルト |
|---|---|---|---|
| reason | 必須 | セッションを終了した理由。 | |
| session_escalated | 省略可 | セッションが人間のエージェントにエスカレーションされたかどうか。 | False |
| params | 省略可 | セッション終了ハンドラに渡すその他のパラメータ。 | なし |
会話を終了する手順の例:
If the user has no more questions execute the tool end_session(reason="success")
ユーザーがライブ対応のエージェントを希望する場合のエスカレーションの指示の例:
If the user wants to talk to a human, execute the tool
end_session(reason="escalate_to_human", session_escalated=True)
ユーザー入力の言語を確認する手順の例:
If the user speaks a language that is not English or Spanish, escalate by
calling: end_session(
reason='Encountered an unsupported language, escalating to a human agent.',
session_escalated=true).