请求输入(Input)

data class RequestInput(val interruptId: String = Uuid.random(), val message: String? = null, val payload: Any? = null, val responseSchema: Schema? = null)

A node's request for user input, which pauses the workflow until a matching response arrives.

Normalized into a long-running adk_request_input function call; the response is a com.google.adk.kt.types.FunctionResponse with matching interruptId.

构造函数(Constructors)

Link copied to clipboard
constructor(interruptId: String = Uuid.random(), message: String? = null, payload: Any? = null, responseSchema: Schema? = null)

类型

Link copied to clipboard
class Builder

Fluent Builder for RequestInput该功能主要为 Java 语言的调用者提供支持;如果某个属性未被设置,其值将默认使用构造函数中指定的默认值。

Link copied to clipboard
object Companion

属性(Properties)

Link copied to clipboard

此请求及其对应响应的标识符。

Link copied to clipboard

显示给用户的提示信息。

Link copied to clipboard
val payload: Any?

用于渲染该请求的附加结构化数据。

Link copied to clipboard

可选的架构用于验证用户的响应。非对象类型的响应会被从包装结构中解包出来(即去除其外部包装)。 result 该值通常是从 JSON 数据中解析得到的(除非数据结构(schema)允许使用字符串类型)。答案的验证与保存过程遵循与节点输入数据相同的规则:如果数据结构允许使用空值(null),那么空值也是被允许的;否则,空值会导致验证失败。

函数

Link copied to clipboard

返回一个 Builder 使用该实例的属性进行初始化,主要适用于 Java 调用者。建议优先选择这种方式。 copy 来自 Java 的代码: copy 该函数会按位置获取所有属性的值;因此,每当有新属性被添加时,其函数签名(即函数的定义)就会发生变化。