UiPath Documentation
uipath-cli
latest
false
UiPath CLI 用户指南
重要 :
请注意,此内容已使用机器翻译进行了本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

uip 对话交流、消息、中继、用户设置

用于对话历史记录和反馈(对话、消息)、语音通道路由(中继)以及“uip Conversational”下的配置文件设置(用户设置)的语法和选项。

作为uip conversational工具的一部分。此页面涵盖四个命令组:交换和消息,用于读取对话的历史记录,并让您对交换进行评分;中继管理启用语音的对话智能体接听或拨号的 SIP 电话号码; “用户设置”用于管理当前用户的对话配置文件。这些内容都无法创建或推动对话 — 有关chat 、 agents和conversations ,请参阅父页面。

概念​

  • Exchange — 对话中的一次请求/响应往返:输入用户消息,输出一条 Assistant 消息(包含内容部分、工具调用、引文)。chat (位于父页面上)实时推动交换;此页面的exchanges / messages动词随后会将其读取。
  • 消息 → 内容部分— 消息是一个或多个内容部分(文本/Markdown 块、工具调用记录)的容器。messages get-content-part 直接获取一部分;如果直接查找失败,CLI 会回退,以获取父消息并搜索其 contentParts 数组,然后再放弃。
  • 中继— 在电话号码下的实例管理中连接的 SIP 电话号码。通过语音流的“创建传出呼叫”按钮即可从已启用出站的中继拨号活动;启用了入站功能的中继通过 trunks assign 将传入调用路由到已发布的 Flow 流程版本。

大纲​

uip conversational exchanges list <conversation-id> [--limit <n>] [--exchange-sort <order>] [--message-sort <order>] [--cursor <token>]
uip conversational exchanges get <conversation-id> <exchange-id> [--message-sort <order>]
uip conversational exchanges feedback <conversation-id> <exchange-id> --rating positive|negative [--comment <text>]
uip conversational messages get <conversation-id> <exchange-id> <message-id>
uip conversational messages get-content-part <conversation-id> <exchange-id> <message-id> <content-part-id>
uip conversational trunks list [--direction inbound|outbound]
uip conversational trunks assign <trunk> [--process-key <key> --folder-key <key> [--entry-point <id>] | --clear] [-y]
uip conversational user-settings get
uip conversational user-settings update [--name <name>] [--email <email>] [--role <role>] [--department <department>] [--company <company>] [--country <country>] [--timezone <timezone>]
uip conversational exchanges list <conversation-id> [--limit <n>] [--exchange-sort <order>] [--message-sort <order>] [--cursor <token>]
uip conversational exchanges get <conversation-id> <exchange-id> [--message-sort <order>]
uip conversational exchanges feedback <conversation-id> <exchange-id> --rating positive|negative [--comment <text>]
uip conversational messages get <conversation-id> <exchange-id> <message-id>
uip conversational messages get-content-part <conversation-id> <exchange-id> <message-id> <content-part-id>
uip conversational trunks list [--direction inbound|outbound]
uip conversational trunks assign <trunk> [--process-key <key> --folder-key <key> [--entry-point <id>] | --clear] [-y]
uip conversational user-settings get
uip conversational user-settings update [--name <name>] [--email <email>] [--role <role>] [--department <department>] [--company <company>] [--country <country>] [--timezone <timezone>]

UIP 对话交流​

检索对话交流并提供反馈。

uip 对话式 Exchange 列表​

参数​
名称必填用途
<conversation-id>是对话 UUID。
选项​
长值描述
--limit <number>正整数每页的交换次数
--exchange-sort <order>ascending|descending交换的排序顺序。
--message-sort <order>ascending|descending消息在每个交换中的排序顺序。
--cursor <token>字符串下一页的分页光标。
示例​
uip conversational exchanges list b2c3d4e5-0000-0000-0000-000000000001 --limit 20
uip conversational exchanges list b2c3d4e5-0000-0000-0000-000000000001 --limit 20
数据形状(--输出 json)​
{
  "Result": "Success",
  "Code": "ExchangeList",
  "Data": {
    "items": [{ "id": "e1e2e3e4-0000-0000-0000-000000000001", "...": "raw exchange record" }],
    "nextCursor": null
  }
}
{
  "Result": "Success",
  "Code": "ExchangeList",
  "Data": {
    "items": [{ "id": "e1e2e3e4-0000-0000-0000-000000000001", "...": "raw exchange record" }],
    "nextCursor": null
  }
}

uip 对话式交换获取​

参数​
名称必填用途
<conversation-id>是对话 UUID。
<exchange-id>是Exchange UUID。
选项​
长值描述
--message-sort <order>ascending|descending返回的交换中消息的排序顺序。
示例​
uip conversational exchanges get b2c3d4e5-0000-0000-0000-000000000001 e1e2e3e4-0000-0000-0000-000000000001
uip conversational exchanges get b2c3d4e5-0000-0000-0000-000000000001 e1e2e3e4-0000-0000-0000-000000000001
数据形状(--输出 json)​
{ "Result": "Success", "Code": "Exchange", "Data": { "id": "e1e2e3e4-0000-0000-0000-000000000001", "messages": [] } }
{ "Result": "Success", "Code": "Exchange", "Data": { "id": "e1e2e3e4-0000-0000-0000-000000000001", "messages": [] } }

uip 对话交流反馈​

参数​
名称必填用途
<conversation-id>是对话 UUID。
<exchange-id>是Exchange UUID。
选项​
长值必填描述
--rating <rating>positive|negative是反馈评分。在进行任何网络调用之前,任何其他值都会在客户端失败。
--comment <comment>字符串否可选反馈注释。
示例​
uip conversational exchanges feedback b2c3d4e5-0000-0000-0000-000000000001 e1e2e3e4-0000-0000-0000-000000000001 --rating positive --comment "Resolved quickly"
uip conversational exchanges feedback b2c3d4e5-0000-0000-0000-000000000001 e1e2e3e4-0000-0000-0000-000000000001 --rating positive --comment "Resolved quickly"
数据形状(--输出 json)​
{ "Result": "Success", "Code": "FeedbackCreated", "Data": { "rating": "positive", "comment": "Resolved quickly" } }
{ "Result": "Success", "Code": "FeedbackCreated", "Data": { "rating": "positive", "comment": "Resolved quickly" } }

UIP 对话消息​

检索对话消息及其内容部分。

UIP 对话消息获取​

参数​
名称必填用途
<conversation-id>是对话 UUID。
<exchange-id>是Exchange UUID。
<message-id>是消息 UUID。
示例​
uip conversational messages get b2c3d4e5-0000-0000-0000-000000000001 e1e2e3e4-0000-0000-0000-000000000001 f1f2f3f4-0000-0000-0000-000000000001
uip conversational messages get b2c3d4e5-0000-0000-0000-000000000001 e1e2e3e4-0000-0000-0000-000000000001 f1f2f3f4-0000-0000-0000-000000000001
数据形状(--输出 json)​
{ "Result": "Success", "Code": "Message", "Data": { "id": "f1f2f3f4-0000-0000-0000-000000000001", "contentParts": [] } }
{ "Result": "Success", "Code": "Message", "Data": { "id": "f1f2f3f4-0000-0000-0000-000000000001", "contentParts": [] } }

uip 对话消息获取内容部分​

参数​
名称必填用途
<conversation-id>是对话 UUID。
<exchange-id>是Exchange UUID。
<message-id>是消息 UUID。
<content-part-id>是内容部分 UUID。

如果直接内容部分查找失败,CLI 会通过获取父消息并在其 contentParts 数组中搜索匹配的 id 或 contentPartId 来自动重试。

示例​
uip conversational messages get-content-part b2c3d4e5-0000-0000-0000-000000000001 e1e2e3e4-0000-0000-0000-000000000001 f1f2f3f4-0000-0000-0000-000000000001 a1a2a3a4-0000-0000-0000-000000000001
uip conversational messages get-content-part b2c3d4e5-0000-0000-0000-000000000001 e1e2e3e4-0000-0000-0000-000000000001 f1f2f3f4-0000-0000-0000-000000000001 a1a2a3a4-0000-0000-0000-000000000001
数据形状(--输出 json)​
{ "Result": "Success", "Code": "ContentPart", "Data": { "id": "a1a2a3a4-0000-0000-0000-000000000001", "isText": true, "data": "..." } }
{ "Result": "Success", "Code": "ContentPart", "Data": { "id": "a1a2a3a4-0000-0000-0000-000000000001", "isText": true, "data": "..." } }

UIP 对话中继​

检查和路由为对话语音配置的租户 SIP 中继(电话号码)。

UIP 对话中继列表​

选项​
长值描述
--direction <direction>inbound|outbound仅为此呼叫方向启用了中继。省略以列出每个中继。任何其他值都将在客户端失败。
示例​
uip conversational trunks list --direction inbound
uip conversational trunks list --direction inbound
数据形状(--输出 json)​
{
  "Result": "Success",
  "Code": "SipTrunkList",
  "Data": [
    { "id": "t1t2t3t4-0000-0000-0000-000000000001", "phoneNumber": "+18334815468", "inboundEnabled": true, "outboundEnabled": false, "processKey": null }
  ]
}
{
  "Result": "Success",
  "Code": "SipTrunkList",
  "Data": [
    { "id": "t1t2t3t4-0000-0000-0000-000000000001", "phoneNumber": "+18334815468", "inboundEnabled": true, "outboundEnabled": false, "processKey": null }
  ]
}

UIP 对话中继分配​

将中继的来电呼叫路由到已发布的 Flow 流程版本,或使用 --clear 清除路由。该流程必须是已部署的 Flow 版本,其流程从来电触发器开始;当流程具有多个此类触发器时, --entry-point可以省略并自动解析;当流程有多个触发器时, --entry-point为必需,并且该命令将无法列出有效 ID。

参数​
名称必填用途
<trunk>是中继 ID (GUID) 或其 E.164 格式的电话号码(例如+18334815468)。
选项​
长值描述
--process-key <key>GUID已部署的 Flow 流程的 Orchestrator 版本密钥(uip or processes list 显示为 Key)。除非 --clear,否则为必需。
--folder-key <key>GUID版本所在的 Orchestrator 文件夹的密钥。除非 --clear,否则为必填项。
--entry-point <id>字符串流程包内的来电入口点 ID。当工作流只有一个工作流时,会自动解决;否则为必需(并根据版本的实际入口点进行验证)。
--clear标记删除中继的入站流程路由。与 --process-key/--folder-key/--entry-point 互斥 — 在客户端无法将它们合并。
-y, --yes标记确认重新路由或清除已有入站路由的中继。在这种情况下为必需 — CLI 从不提示。

验证顺序:--clear 与首先检查流程/文件夹对;则中继实际上必须为 inboundEnabled(在仅出站的中继上进行路由尝试会失败,指向 trunks list --direction inbound);然后,如果主干已绑定,则需要 -y;然后,在写入绑定之前,会从平台列出发布的真实传入调用入口点,并根据 --entry-point 进行验证(或自动解析)— 写入完全成功或全部失败。

示例​
# Auto-resolve the entry point (release has exactly one Incoming call trigger)
uip conversational trunks assign +18334815468 --process-key 9e4b2f17-7c3a-4d81-b592-3f6e8a1d5c09 --folder-key a9f3b2c1-7d4e-4a8b-9c2f-5e1d3b6a8f7e

# Clear inbound routing on a bound trunk
uip conversational trunks assign +18334815468 --clear -y
# Auto-resolve the entry point (release has exactly one Incoming call trigger)
uip conversational trunks assign +18334815468 --process-key 9e4b2f17-7c3a-4d81-b592-3f6e8a1d5c09 --folder-key a9f3b2c1-7d4e-4a8b-9c2f-5e1d3b6a8f7e

# Clear inbound routing on a bound trunk
uip conversational trunks assign +18334815468 --clear -y
数据形状(--输出 json)​
{
  "Result": "Success",
  "Code": "SipTrunkAssign",
  "Data": { "id": "t1t2t3t4-0000-0000-0000-000000000001", "phoneNumber": "+18334815468", "processKey": "9e4b2f17-7c3a-4d81-b592-3f6e8a1d5c09", "folderKey": "a9f3b2c1-7d4e-4a8b-9c2f-5e1d3b6a8f7e", "entryPoint": "..." }
}
{
  "Result": "Success",
  "Code": "SipTrunkAssign",
  "Data": { "id": "t1t2t3t4-0000-0000-0000-000000000001", "phoneNumber": "+18334815468", "processKey": "9e4b2f17-7c3a-4d81-b592-3f6e8a1d5c09", "folderKey": "a9f3b2c1-7d4e-4a8b-9c2f-5e1d3b6a8f7e", "entryPoint": "..." }
}

--clear 写入 { processKey: null, folderKey: null, entryPoint: null }。

uip 对话用户设置​

管理当前用户的对话配置文件设置。

获取 uip 对话用户设置​

除全局变量外没有其他选项。

示例​
uip conversational user-settings get
uip conversational user-settings get
数据形状(--输出 json)​
{
  "Result": "Success",
  "Code": "UserSettings",
  "Data": { "name": "Jane Doe", "email": "jane@example.com", "role": "Support Lead", "department": "Support", "company": "Acme", "country": "US", "timezone": "America/New_York" }
}
{
  "Result": "Success",
  "Code": "UserSettings",
  "Data": { "name": "Jane Doe", "email": "jane@example.com", "role": "Support Lead", "department": "Support", "company": "Acme", "country": "US", "timezone": "America/New_York" }
}

uip 对话用户设置更新​

至少需要一个选项 — 在进行任何网络调用之前,忽略客户端的所有七个失败。

选项​
长值描述
--name <name>字符串用户名。
--email <email>字符串电子邮件地址。
--role <role>字符串用户角色。
--department <department>字符串部门。
--company <company>字符串公司。
--country <country>字符串国家/地区。
--timezone <timezone>字符串时区。
示例​
uip conversational user-settings update --timezone "America/Los_Angeles"
uip conversational user-settings update --timezone "America/Los_Angeles"
数据形状(--输出 json)​

形状与 get 的响应相同,Code: "UserSettingsUpdated"。

另请参阅​

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新