mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-06-11 12:46:53 +08:00
feat(agent-dashscope): add DashScope (Qwen) model factory
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
44
liteflow-react-agent/liteflow-react-agent-dashscope/pom.xml
Normal file
44
liteflow-react-agent/liteflow-react-agent-dashscope/pom.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.yomahub</groupId>
|
||||
<artifactId>liteflow-react-agent</artifactId>
|
||||
<version>${revision}</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>liteflow-react-agent-dashscope</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.yomahub</groupId>
|
||||
<artifactId>liteflow-react-agent-core</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<version>${junit.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<skipTests>false</skipTests>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.yomahub.liteflow.agent.dashscope;
|
||||
|
||||
import io.agentscope.core.model.DashScopeChatModel;
|
||||
|
||||
public final class DashScopeModelFactory {
|
||||
private DashScopeModelFactory() {}
|
||||
|
||||
public static DashScopeChatModel of(String apiKey, String modelName) {
|
||||
return DashScopeChatModel.builder()
|
||||
.apiKey(apiKey)
|
||||
.modelName(modelName)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.yomahub.liteflow.agent.dashscope;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
class DashScopeModelFactoryTest {
|
||||
@Test void construct_ok() { assertNotNull(DashScopeModelFactory.of("k", "qwen3-max")); }
|
||||
}
|
||||
Reference in New Issue
Block a user