agentscope-extensions-model-dashscope 接入阿里云 DashScope Qwen Model,包括多模态和推理能力的 Qwen 模型。
添加依赖
ModelRegistry
设置DASHSCOPE_API_KEY 后,可以使用 dashscope:<model>,也可以使用 Qwen 短名:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
agentscope-extensions-model-dashscope 接入阿里云 DashScope Qwen Model,包括多模态和推理能力的 Qwen 模型。
<dependency>
<groupId>io.agentscope</groupId>
<artifactId>agentscope-extensions-model-dashscope</artifactId>
<version>${agentscope.version}</version>
</dependency>
DASHSCOPE_API_KEY 后,可以使用 dashscope:<model>,也可以使用 Qwen 短名:
ReActAgent agent = ReActAgent.builder()
.name("assistant")
.model("dashscope:qwen-plus") // 底层由 ModelRegistry.resolve(modelId) 解析
.build();
ReActAgent agent = ReActAgent.builder()
.name("assistant")
.model("qwen-plus") // 底层由 ModelRegistry.resolve(modelId) 解析
.build();
import io.agentscope.extensions.model.dashscope.DashScopeChatModel;
DashScopeChatModel model = DashScopeChatModel.builder()
.apiKey(System.getenv("DASHSCOPE_API_KEY"))
.modelName("qwen-plus")
.stream(true)
.build();
<dependency>
<groupId>io.agentscope</groupId>
<artifactId>agentscope-dashscope-spring-boot-starter</artifactId>
<version>${agentscope.version}</version>
</dependency>