AS AgentScopeAPI 手册 / API Reference

DashScopeA2uiModelClient

@Component public class DashScopeA2uiModelClient implements A2uiModelClient
源码Source io/agentscope/examples/copilotkit/a2ui/DashScopeA2uiModelClient.java:34–80

DashScope A 2 ui 模型客户端,封装与远端服务的连接和调用。位于 io.agentscope.examples.copilotkit.a2ui 包,实现 A2uiModelClient。核心成员包括 name、isAvailable、getOrder、generate、DashScopeA2uiModelClient。

Fallback A2UI composer running on DashScope, so the demo still produces surfaces without a Gemini key.

A fresh single-iteration ReActAgent is built per request: the composer is stateless and must never inherit conversation memory from a previous surface.

构造器摘要Constructor Summary

构造器Constructor说明Description
public DashScopeA2uiModelClient(String modelName)
初始化 `DashScopeA2uiModelClient` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public String name()
返回名称。
Returns the name.
public boolean isAvailable()
判断是否可用。
Returns whether the available.
public int getOrder()
获取顺序。
Returns the order.
public String generate(String systemPrompt, String userPrompt)
执行 `generate` 方法。
Performs the generate operation.

构造器详情Constructor Detail

DashScopeA2uiModelClient

public DashScopeA2uiModelClient(String modelName)

初始化 DashScopeA2uiModelClient 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
modelNameString模型名称(类型 `String`)。The model name.
源码Source io/agentscope/examples/copilotkit/a2ui/DashScopeA2uiModelClient.java:41–44

方法详情Method Detail

name

public String name()

返回名称。

Returns the name.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/examples/copilotkit/a2ui/DashScopeA2uiModelClient.java:46–49

isAvailable

public boolean isAvailable()

判断是否可用。

Returns whether the available.

返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/examples/copilotkit/a2ui/DashScopeA2uiModelClient.java:51–55

getOrder

public int getOrder()

获取顺序。

Returns the order.

返回Returns int
返回数值结果。Returns a numeric result.
源码Source io/agentscope/examples/copilotkit/a2ui/DashScopeA2uiModelClient.java:57–60

generate

public String generate(String systemPrompt, String userPrompt)

执行 generate 方法。

Performs the generate operation.

参数Parameters
名称Name类型Type说明Description
systemPromptString系统提示词(类型 `String`)。The system prompt.
userPromptString用户提示词(类型 `String`)。The user prompt.
返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/examples/copilotkit/a2ui/DashScopeA2uiModelClient.java:62–79
基于官方固定版本源码静态生成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.