UserInputBase
@Deprecated(forRemoval = true, since = "2.0.0") public interface UserInputBase
源码Source
io/agentscope/core/agent/user/UserInputBase.java:28–43定义用户输入基类契约的接口。位于 io.agentscope.core.agent.user 包。核心成员包括 handleInput。
Strategy interface for handling user input from different sources. Enables pluggable input implementations such as terminal console, web UI, or programmatic sources. Implementations convert raw user input into UserInputData containing both content blocks and optional structured data, maintaining consistency across different input channels.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Mono<UserInputData> handleInput(String agentId, String agentName, List<Msg> contextMessages, Class<?> structuredModel) | 处理输入。 Handle user input and return the input data. |
方法详情Method Detail
handleInput
public Mono<UserInputData> handleInput(String agentId, String agentName, List<Msg> contextMessages, Class<?> structuredModel)
处理输入。
Handle user input and return the input data.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agentId | String | 智能体标识(类型 `String`)。The agent identifier |
agentName | String | 智能体名称。The agent name |
contextMessages | List<Msg> | 上下文消息(类型 `List`)。Optional messages to display before prompting (e.g., assistant response) |
structuredModel | Class<?> | 用于结构化输入格式的可选类。Optional class for structured input format |
Mono<UserInputData>返回Mono。Mono containing the user input data
源码Source
io/agentscope/core/agent/user/UserInputBase.java:41–42