Skip to content

Commit 3a258b3

Browse files
committed
update
1 parent ca3297f commit 3a258b3

File tree

446 files changed

+3998
-4208
lines changed

Some content is hidden

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

446 files changed

+3998
-4208
lines changed

.DS_Store

0 Bytes
Binary file not shown.

.vscode/launch.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"name": "StarterApplication",
1010
"request": "launch",
1111
"mainClass": "com.bytedesk.starter.StarterApplication",
12-
"projectName": "starter"
12+
"projectName": "bytedesk-starter"
1313
}
1414
]
1515
}

modules/.DS_Store

-2 KB
Binary file not shown.

modules/ai/.DS_Store

0 Bytes
Binary file not shown.

modules/ai/src/.DS_Store

0 Bytes
Binary file not shown.

modules/ai/src/main/java/com/bytedesk/ai/kb/Kb.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @Author: jackning 270580156@qq.com
33
* @Date: 2024-03-22 16:13:38
44
* @LastEditors: jackning 270580156@qq.com
5-
* @LastEditTime: 2024-06-11 11:41:42
5+
* @LastEditTime: 2024-06-14 12:07:30
66
* @Description: bytedesk.com https://github.com/Bytedesk/bytedesk
77
* Please be aware of the BSL license restrictions before installing Bytedesk IM –
88
* selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license.
@@ -16,6 +16,7 @@
1616

1717
import com.bytedesk.core.base.BaseEntity;
1818
import com.bytedesk.core.constant.I18Consts;
19+
import com.bytedesk.core.enums.LanguageEnum;
1920

2021
import jakarta.persistence.Entity;
2122
import jakarta.persistence.Table;
@@ -53,7 +54,8 @@ public class Kb extends BaseEntity {
5354
private boolean published = true;
5455

5556
@Builder.Default
56-
private String language = I18Consts.ZH_CN;
57+
// private String language = I18Consts.ZH_CN;
58+
private LanguageEnum language = LanguageEnum.ZH_CN;
5759

5860
/**
5961
* belong to org

modules/ai/src/main/java/com/bytedesk/ai/robot/Robot.java

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
package com.bytedesk.ai.robot;
1616

1717
import com.bytedesk.ai.kb.Kb;
18+
import com.bytedesk.ai.settings.RobotServiceSettings;
1819
import com.bytedesk.core.base.BaseEntity;
1920
import com.bytedesk.core.constant.AvatarConsts;
2021
import com.bytedesk.core.constant.I18Consts;

modules/ai/src/main/java/com/bytedesk/ai/robot/RobotLlm.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ public class RobotLlm {
5050
private RobotEmbedingEnum embeddings = RobotEmbedingEnum.M3E_BASE;
5151

5252
@Builder.Default
53-
private Float temperature = 0.9f;
53+
private float temperature = 0.9f;
5454

5555
@Builder.Default
56-
private Float topP = 0.7f;
56+
private float topP = 0.7f;
5757

5858
@Builder.Default
59-
private String prompt = I18Consts.I18N_ROBOT_LLM_PROMPT_ZH_CN;
59+
private String prompt = I18Consts.I18N_ROBOT_LLM_PROMPT;
6060

6161
// 默认是true,表示使用自定义模型, false表示云服务(需要在配置文件中配置相关参数)
6262
@Builder.Default

modules/ai/src/main/java/com/bytedesk/ai/robot/RobotRequest.java

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
*/
1515
package com.bytedesk.ai.robot;
1616

17+
import com.bytedesk.ai.settings.RobotServiceSettingsRequest;
1718
import com.bytedesk.core.base.BaseRequest;
1819

1920
import jakarta.validation.constraints.NotBlank;

modules/ai/src/main/java/com/bytedesk/ai/robot/RobotResponse.java

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
*/
1515
package com.bytedesk.ai.robot;
1616

17+
import com.bytedesk.ai.settings.RobotServiceSettings;
1718
import com.bytedesk.core.base.BaseResponse;
1819

1920
import lombok.AllArgsConstructor;

modules/ai/src/main/java/com/bytedesk/ai/robot/RobotService.java

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
import com.bytedesk.ai.kb.Kb;
3131
import com.bytedesk.ai.kb.KbService;
32+
import com.bytedesk.ai.settings.RobotServiceSettings;
3233
import com.bytedesk.core.base.BaseService;
3334
import com.bytedesk.core.constant.AvatarConsts;
3435
import com.bytedesk.core.constant.I18Consts;

modules/ai/src/main/java/com/bytedesk/ai/robot/RobotServiceSettingsRequest.java

-91
This file was deleted.

modules/ai/src/main/java/com/bytedesk/ai/robot/RobotServiceSettingsResponse.java

-92
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
/*
2+
* @Author: jackning 270580156@qq.com
3+
* @Date: 2024-06-04 17:16:54
4+
* @LastEditors: jackning 270580156@qq.com
5+
* @LastEditTime: 2024-06-14 10:57:24
6+
* @Description: bytedesk.com https://github.com/Bytedesk/bytedesk
7+
* Please be aware of the BSL license restrictions before installing Bytedesk IM –
8+
* selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license.
9+
* 仅支持企业内部员工自用,严禁私自用于销售、二次销售或者部署SaaS方式销售
10+
* Business Source License 1.1: https://github.com/Bytedesk/bytedesk/blob/main/LICENSE
11+
* contact: 270580156@qq.com
12+
* 联系:270580156@qq.com
13+
* Copyright (c) 2024 by bytedesk.com, All Rights Reserved.
14+
*/
15+
package com.bytedesk.ai.settings;
16+
17+
import com.bytedesk.core.service_settings.BaseServiceSettings;
18+
import com.bytedesk.core.thread.ThreadTypeEnum;
19+
20+
import jakarta.persistence.Embeddable;
21+
import lombok.AllArgsConstructor;
22+
import lombok.Builder;
23+
import lombok.Data;
24+
import lombok.EqualsAndHashCode;
25+
import lombok.NoArgsConstructor;
26+
import lombok.experimental.Accessors;
27+
28+
@Data
29+
@EqualsAndHashCode(callSuper = true)
30+
@Builder
31+
@Embeddable
32+
@Accessors(chain = true)
33+
@AllArgsConstructor
34+
@NoArgsConstructor
35+
public class RobotServiceSettings extends BaseServiceSettings {
36+
37+
// @Builder.Default
38+
// private String language = I18Consts.ZH_CN;
39+
40+
// @Builder.Default
41+
// @Column(name = "is_auto_pop")
42+
// private boolean autoPop = false;
43+
44+
// /**
45+
// * TODO: set different tips for different lang
46+
// */
47+
// @Builder.Default
48+
// private boolean showTopTip = false;
49+
50+
// @Builder.Default
51+
// @Column(length = 512)
52+
// private String topTip = I18Consts.I18N_TOP_TIP;
53+
54+
// @Builder.Default
55+
// private String welcomeTip = I18Consts.I18N_WELCOME_TIP;
56+
57+
// @Builder.Default
58+
// private String leavemsgTip = I18Consts.I18N_LEAVEMSG_TIP;
59+
60+
// /** auto close time in min - 默认自动关闭时间,单位分钟 */
61+
// @Builder.Default
62+
// private Double autoCloseMin = Double.valueOf(25);
63+
64+
// @Builder.Default
65+
// @ManyToMany(fetch = FetchType.LAZY)
66+
// private List<QuickButton> quickButtons = new ArrayList<>();
67+
68+
// @Builder.Default
69+
// @ManyToMany(fetch = FetchType.LAZY)
70+
// private List<Faq> faqs = new ArrayList<>();
71+
72+
// 是否允许转人工
73+
@Builder.Default
74+
private boolean allowTransferToAgent = true;
75+
76+
// 限制仅允许:workgroup、appointed
77+
@Builder.Default
78+
private ThreadTypeEnum transferType = ThreadTypeEnum.WORKGROUP;
79+
80+
// agentUid or workgroupUid
81+
private String transferToUid;
82+
83+
//
84+
// @Builder.Default
85+
// private boolean showLogo = true;
86+
87+
// // 有效日期
88+
// private Date validateUntil;
89+
}

0 commit comments

Comments
 (0)