系统工具

系统工具是内置工具,可供智能体用于执行常见任务。 该内容无法编辑。

与其他工具类似,在使用系统工具时,请提供有关何时使用该工具的智能体指令,并提供工具实参。

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).