Skip to content

Commit 5e5f1f3

Browse files
authored
Merge pull request #336 from erupts/develop
1.13.2
2 parents 83d71f3 + a14e1d9 commit 5e5f1f3

File tree

236 files changed

+3542
-1041
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

236 files changed

+3542
-1041
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ HELP.md
1616

1717
### IntelliJ IDEA ###
1818
.idea
19+
!.idea/icon.png
1920
*.iws
2021
*.iml
2122
*.ipr

.idea/icon.png

476 KB
Loading

GUIDE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Official website: https://www.erupt.xyz
2+
Deployment documentation: https://www.yuque.com/erupts/erupt/tpq1l9
3+
Online demo: https://www.erupt.xyz/demo
4+
Github demo code: https://github.com/erupts/erupt-example
5+
Gitee demo code: https://gitee.com/erupt/erupt-example

deploy/erupt-cloud-server-docker/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>xyz.erupt</groupId>
88
<artifactId>erupt</artifactId>
9-
<version>1.13.1</version>
9+
<version>1.13.2</version>
1010
<relativePath>../../pom.xml</relativePath>
1111
</parent>
1212

erupt-admin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<parent>
1111
<groupId>xyz.erupt</groupId>
1212
<artifactId>erupt</artifactId>
13-
<version>1.13.1</version>
13+
<version>1.13.2</version>
1414
<relativePath>../pom.xml</relativePath>
1515
</parent>
1616

erupt-ai/RREAME.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#### AI Module
22

3-
ChatGpt/DeepSeek/Kimi/ollama
3+
Unified LLM Access & Support Layer

erupt-ai/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<parent>
1111
<groupId>xyz.erupt</groupId>
1212
<artifactId>erupt</artifactId>
13-
<version>1.13.1</version>
13+
<version>1.13.2</version>
1414
<relativePath>../pom.xml</relativePath>
1515
</parent>
1616

erupt-ai/src/main/java/xyz/erupt/ai/EruptAiAutoConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public void post() {
4545

4646
@Override
4747
public ModuleInfo info() {
48-
return ModuleInfo.builder().name("erupt-ai").build();
48+
return ModuleInfo.builder().name("erupt-ai").description("The large-model-driven ERUPT AI infrastructure").build();
4949
}
5050

5151
@Override

erupt-ai/src/main/java/xyz/erupt/ai/call/AiFunctionCall.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,12 @@
66
*/
77
public interface AiFunctionCall {
88

9-
default String code() {
10-
return this.getClass().getSimpleName();
11-
}
12-
139
default boolean mcpCall() {
1410
return true;
1511
}
1612

1713
default String name() {
18-
return this.code();
14+
return this.getClass().getSimpleName();
1915
}
2016

2117
String description();

erupt-ai/src/main/java/xyz/erupt/ai/call/AiFunctionManager.java

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,36 @@ public class AiFunctionManager implements ApplicationRunner {
4343
@Override
4444
public void run(ApplicationArguments args) {
4545
EruptSpringUtil.scannerPackage(EruptApplication.getScanPackage(),
46-
new TypeFilter[]{new AssignableTypeFilter(AiFunctionCall.class)}, clazz ->
47-
aiFunctions.put(clazz.getSimpleName(), (AiFunctionCall) EruptSpringUtil.getBean(clazz))
48-
);
46+
new TypeFilter[]{new AssignableTypeFilter(AiFunctionCall.class)}, clazz -> {
47+
AiFunctionCall functionCall = (AiFunctionCall) EruptSpringUtil.getBean(clazz);
48+
aiFunctions.put(functionCall.name(), functionCall);
49+
});
4950
}
5051

5152
public String getFunctionCallPrompt() {
52-
StringBuilder sb = new StringBuilder("下面是一组 Function Call 的映射,根据情况决定是否调用,否则忽略这段提示词\n");
53+
StringBuilder sb = new StringBuilder("""
54+
Below is a mapping of available Function Calls.
55+
56+
Please decide whether a function is clearly required after understanding the user's question.
57+
58+
Rules:
59+
1. Call a function IF AND ONLY IF the user's intent clearly and directly matches the function description,
60+
and calling the function will significantly improve the accuracy of the response.
61+
2. If a function is triggered, STRICTLY output ONLY the function name.
62+
Do NOT output explanations, symbols, punctuation, or any extra text.
63+
3. If no function is required, IGNORE this entire instruction block
64+
and respond to the user normally.
65+
66+
Available functions:
67+
""");
5368
for (Map.Entry<String, AiFunctionCall> entry : aiFunctions.entrySet()) {
54-
sb.append("- 如果用户问:").append(entry.getValue().description()).append(",就只回复:").append(entry.getKey()).append("\n");
69+
sb.append("- ")
70+
.append(entry.getKey())
71+
.append(": ")
72+
.append(entry.getValue().description())
73+
.append("\n");
5574
}
75+
5676
return sb.toString();
5777
}
5878

0 commit comments

Comments
 (0)