システム ツール

システムツールは、エージェントが一般的なタスクを実行するために使用できる組み込みツールです。編集はできません。

他のツールと同様に、システムツールを使用する場合は、ツールを使用するタイミングとツール引数に関するエージェントの手順を指定します。

customize_response

割り込みと DTMF パラメータの無効化など、パラメータをきめ細かく制御してエージェントの音声レスポンスを生成します。

引数:

引数 必須 / 省略可 説明 デフォルト
コンテンツ 必須 エージェントのレスポンスのテキスト コンテンツ。
enable_dtmf 省略可 キーボード入力(DTMF)を有効にするかどうか。 誤り
dtmf_endpointing_timeout_modes 省略可 ユーザーが入力して回答するまでの待ち時間。[短い]、[中]、[長い] から選択します。 "mid"
dtmf_finish_digit 省略可 DTMF の収集を終了する DTMF ディジット。例: 「#」。 空の文字列
disable_barge_in 省略可 エージェントが話しているときにユーザーが割り込むことを禁止します。 誤り

DTMF で電話番号を収集する手順の例:

make the tool call customize_response(content="Please type your phone number",
enable_dtmf=True, dtmf_endpointing_timeout_modes='short')

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 省略可 セッションが人間のエージェントにエスカレーションされたかどうか。 誤り
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).