AS AgentScopeAPI 手册 / API Reference

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
agentIdString智能体标识(类型 `String`)。The agent identifier
agentNameString智能体名称。The agent name
contextMessagesList<Msg>上下文消息(类型 `List`)。Optional messages to display before prompting (e.g., assistant response)
structuredModelClass<?>用于结构化输入格式的可选类。Optional class for structured input format
返回Returns Mono<UserInputData>
返回Mono。Mono containing the user input data
源码Source io/agentscope/core/agent/user/UserInputBase.java:41–42
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.