系統工具

系統工具是內建工具,代理程式可用於執行一般工作。不過你無法編輯。

與其他工具類似,使用系統工具時,請提供代理程式指令,說明何時使用工具,並提供工具引數。

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 引數將資料轉送至最終回應的結束工作階段中繼資料。

引數:

引數 必要/選用 說明 預設
原因 必填 結束工作階段的原因。
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).