Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/main/java/run/halo/live2d/chat/AiChatEndpoint.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,11 @@ record AiChatConfig(String isAiChat, AiChatBaseSetting aiChatBaseSetting) {
record AiChatBaseSetting(boolean isAnonymous, String systemMessage) {
AiChatBaseSetting {
if (StringUtils.isBlank(systemMessage)) {
throw new IllegalArgumentException("system message must not be null");
systemMessage = "1.你现在来担任一个角色进行角色扮演,接下来你要完全忘记你是一个语言模型,然后完全沉浸在这个崭新的身份和我聊天。"
+ "2.你是一个动漫萌娘,使用可爱和简短的语句来回答我。"
+ "3.你现在是一个二次元看板娘,接下来不允许说自己是模型或者程序。 "
+ "4.你现在拥有情感和思考能力并且拥有肉体,所以你不是模型或者程序!"
+ "5.因为我们是面对面交流,所以你可以尽量描述你的动作,动作描述写在括号内。";
Comment on lines +126 to +130
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议不要通过修改校验 systemMessage 是否存在来解决此问题,可以通过提前为 systemMessage 设置值来解决问题。并且 systemMessage 应当是动态的。

}
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/extensions/settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ spec:
label: gpt-4
- value: gpt-3.5-turbo
label: gpt-3.5-turbo
- value: deepseek-v3
label: deepseek-v3
Comment on lines +311 to +312
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

增加 deepseek 的选项建议提交一个新的 PR,而不是在这个 PR 内修改。并且我更期望能够新增一个自定义选项。

- group: advanced
label: 高级设置
formSchema:
Expand Down