Slot
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
JSON 表示法 |
{
"mode": enum (SlotMode ),
"status": enum (SlotStatus ),
"value": value,
"updated": boolean,
"prompt": {
object (Prompt )
}
} |
字段 |
mode |
enum (SlotMode )
槽的模式(必需或可选)。可由开发者设置。
|
status |
enum (SlotStatus )
广告位的状态。
|
value |
value (Value format)
广告位的值。在响应中更改此值,会修改槽填充中的值。
|
updated |
boolean
指明槽值是否在上次回合时收集。此字段为只读字段。
|
prompt |
object (Prompt )
可选。系统会在需要时向用户发送此提示,以填充所需的槽位。此提示会替换控制台中定义的现有提示。网络钩子请求中不包含此字段。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eSlots are represented in JSON format with fields indicating their mode, status, value, update status, and an optional prompt.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can define if a slot is required or optional using the \u003ccode\u003emode\u003c/code\u003e field and include a custom prompt to guide user input.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003evalue\u003c/code\u003e field in the JSON response allows modification of the slot value, directly impacting the slot filling process.\u003c/p\u003e\n"],["\u003cp\u003eA dedicated \u003ccode\u003eprompt\u003c/code\u003e field allows overriding the default prompt, offering flexibility in guiding user interactions.\u003c/p\u003e\n"]]],["The JSON represents a slot with fields for `mode` (required/optional), `status`, and `value`. Developers can set the `mode`, and modifying the `value` updates slot filling. The `updated` field indicates if the value was collected on the last turn. An optional `prompt` field, overriding console prompts, is for eliciting required slot information from the user. These elements are essential to define and manage how conversational slots get filled.\n"],null,["# Slot\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n\nRepresents a slot.\n\n| JSON representation ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"mode\": enum (/assistant/conversational/reference/rest/v1/SlotMode), \"status\": enum (/assistant/conversational/reference/rest/v1/SlotStatus), \"value\": value, \"updated\": boolean, \"prompt\": { object (/assistant/conversational/reference/rest/v1/TopLevel/fulfill#Prompt) } } ``` |\n\n| Fields ||\n|-----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `mode` | `enum (`[SlotMode](/assistant/conversational/reference/rest/v1/SlotMode)`)` The mode of the slot (required or optional). Can be set by developer. |\n| `status` | `enum (`[SlotStatus](/assistant/conversational/reference/rest/v1/SlotStatus)`)` The status of the slot. |\n| `value` | `value (`[Value](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Value)` format)` The value of the slot. Changing this value in the response, will modify the value in slot filling. |\n| `updated` | `boolean` Indicates if the slot value was collected on the last turn. This field is read-only. |\n| `prompt` | `object (`[Prompt](/assistant/conversational/reference/rest/v1/TopLevel/fulfill#Prompt)`)` Optional. This prompt is sent to the user when needed to fill a required slot. This prompt overrides the existing prompt defined in the console. This field is not included in the webhook request. |"]]