mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-01-22 08:46:19 +00:00
Compare commits
1 Commits
qwencode-s
...
qwencode-s
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e8625658ba |
@@ -5,8 +5,11 @@
|
|||||||
<groupId>com.alibaba</groupId>
|
<groupId>com.alibaba</groupId>
|
||||||
<artifactId>qwencode-sdk</artifactId>
|
<artifactId>qwencode-sdk</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<version>0.0.1-alpha1</version>
|
<version>0.0.1-alpha</version>
|
||||||
<name>qwencode-sdk</name>
|
<name>qwencode-sdk</name>
|
||||||
|
<description>The Qwen Code Java SDK is a minimum experimental SDK for programmatic access to Qwen Code functionality. It provides a Java interface
|
||||||
|
to interact with the Qwen Code CLI, allowing developers to integrate Qwen Code capabilities into their Java applications.
|
||||||
|
</description>
|
||||||
<url>https://maven.apache.org</url>
|
<url>https://maven.apache.org</url>
|
||||||
<licenses>
|
<licenses>
|
||||||
<license>
|
<license>
|
||||||
@@ -184,7 +187,7 @@
|
|||||||
</snapshotRepository>
|
</snapshotRepository>
|
||||||
<repository>
|
<repository>
|
||||||
<id>central</id>
|
<id>central</id>
|
||||||
<url>https://central.sonatype.com/service/local/staging/deploy/maven2/</url>
|
<url>https://central.sonatype.org/service/local/staging/deploy/maven2/</url>
|
||||||
</repository>
|
</repository>
|
||||||
</distributionManagement>
|
</distributionManagement>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ class SessionTest {
|
|||||||
writeSplitLine("prompt 2 end");
|
writeSplitLine("prompt 2 end");
|
||||||
|
|
||||||
session.continueSession();
|
session.continueSession();
|
||||||
session.sendPrompt("当前目录有多少个java文件", sessionEventConsumers);
|
session.sendPrompt("How many Java files are in the current directory", sessionEventConsumers);
|
||||||
writeSplitLine("prompt 3 end");
|
writeSplitLine("prompt 3 end");
|
||||||
|
|
||||||
session.close();
|
session.close();
|
||||||
|
|||||||
@@ -63,17 +63,18 @@ class ProcessTransportTest {
|
|||||||
return "result".equals(JSON.parseObject(line).getString("type"));
|
return "result".equals(JSON.parseObject(line).getString("type"));
|
||||||
});
|
});
|
||||||
|
|
||||||
String userMessage2 = new SDKUserMessage().setSessionId(sessionId).setContent("请使用中文").toString();
|
String userMessage2 = new SDKUserMessage().setSessionId(sessionId).setContent("Please respond in Chinese").toString();
|
||||||
transport.inputWaitForMultiLine(userMessage2, line -> {
|
transport.inputWaitForMultiLine(userMessage2, line -> {
|
||||||
return "result".equals(JSON.parseObject(line).getString("type"));
|
return "result".equals(JSON.parseObject(line).getString("type"));
|
||||||
});
|
});
|
||||||
|
|
||||||
String userMessage3 = new SDKUserMessage().setSessionId(sessionId).setContent("当前工作区有多少个文件").toString();
|
|
||||||
|
String userMessage3 = new SDKUserMessage().setSessionId(sessionId).setContent("How many files are there in the current workspace").toString();
|
||||||
transport.inputWaitForMultiLine(userMessage3, line -> {
|
transport.inputWaitForMultiLine(userMessage3, line -> {
|
||||||
return "result".equals(JSON.parseObject(line).getString("type"));
|
return "result".equals(JSON.parseObject(line).getString("type"));
|
||||||
});
|
});
|
||||||
|
|
||||||
String userMessage4 = new SDKUserMessage().setSessionId("session-sec" + UUID.randomUUID()).setContent("有多少个xml文件").toString();
|
String userMessage4 = new SDKUserMessage().setSessionId("session-sec" + UUID.randomUUID()).setContent("How many XML files are there").toString();
|
||||||
transport.inputWaitForMultiLine(userMessage4, line -> {
|
transport.inputWaitForMultiLine(userMessage4, line -> {
|
||||||
return "result".equals(JSON.parseObject(line).getString("type"));
|
return "result".equals(JSON.parseObject(line).getString("type"));
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user