mirror of
https://gitcode.com/ageerle/ruoyi-ai.git
synced 2026-04-15 21:03:40 +00:00
refactor: 重构项目架构,优化向量服务
- 移除 Graph 知识图谱相关模块(Neo4j、GraphRAG等) - 移除 demo、job、wechat 示例模块,简化项目结构 - 修复向量维度获取方式,改为从数据库配置读取 - 添加 gRPC BOM 依赖管理,解决 Milvus SDK 版本冲突 - 新增 PPIO 服务和 Embedding 提供者支持 - 清理冗余代码和未使用的依赖 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -48,11 +48,6 @@ public class ChatMessageBo extends BaseEntity {
|
||||
*/
|
||||
private String role;
|
||||
|
||||
/**
|
||||
* 扣除金额
|
||||
*/
|
||||
private Long deductCost;
|
||||
|
||||
/**
|
||||
* 累计 Tokens
|
||||
*/
|
||||
@@ -63,11 +58,6 @@ public class ChatMessageBo extends BaseEntity {
|
||||
*/
|
||||
private String modelName;
|
||||
|
||||
/**
|
||||
* 计费类型(1-token计费,2-次数计费)
|
||||
*/
|
||||
private String billingType;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
|
||||
@@ -45,30 +45,15 @@ public class ChatModelBo extends BaseEntity {
|
||||
*/
|
||||
private String modelDescribe;
|
||||
|
||||
/**
|
||||
* 模型价格
|
||||
*/
|
||||
private Long modelPrice;
|
||||
|
||||
/**
|
||||
* 计费类型
|
||||
*/
|
||||
private String modelType;
|
||||
|
||||
/**
|
||||
* 是否显示
|
||||
*/
|
||||
private String modelShow;
|
||||
|
||||
/**
|
||||
* 是否免费
|
||||
* 向量维度
|
||||
*/
|
||||
private String modelFree;
|
||||
|
||||
/**
|
||||
* 模型优先级(值越大优先级越高)
|
||||
*/
|
||||
private Long priority;
|
||||
private Integer modelDimension;
|
||||
|
||||
/**
|
||||
* 请求地址
|
||||
|
||||
@@ -56,12 +56,6 @@ public class ChatMessageVo implements Serializable {
|
||||
@ExcelProperty(value = "对话角色")
|
||||
private String role;
|
||||
|
||||
/**
|
||||
* 扣除金额
|
||||
*/
|
||||
@ExcelProperty(value = "扣除金额")
|
||||
private Long deductCost;
|
||||
|
||||
/**
|
||||
* 累计 Tokens
|
||||
*/
|
||||
@@ -74,12 +68,6 @@ public class ChatMessageVo implements Serializable {
|
||||
@ExcelProperty(value = "模型名称")
|
||||
private String modelName;
|
||||
|
||||
/**
|
||||
* 计费类型(1-token计费,2-次数计费)
|
||||
*/
|
||||
@ExcelProperty(value = "计费类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "1=-token计费,2-次数计费")
|
||||
private String billingType;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
|
||||
@@ -54,17 +54,6 @@ public class ChatModelVo implements Serializable {
|
||||
@ExcelProperty(value = "模型描述")
|
||||
private String modelDescribe;
|
||||
|
||||
/**
|
||||
* 模型价格
|
||||
*/
|
||||
@ExcelProperty(value = "模型价格")
|
||||
private Long modelPrice;
|
||||
|
||||
/**
|
||||
* 计费类型
|
||||
*/
|
||||
@ExcelProperty(value = "计费类型")
|
||||
private String modelType;
|
||||
|
||||
/**
|
||||
* 是否显示
|
||||
@@ -73,16 +62,10 @@ public class ChatModelVo implements Serializable {
|
||||
private String modelShow;
|
||||
|
||||
/**
|
||||
* 是否免费
|
||||
* 向量维度
|
||||
*/
|
||||
@ExcelProperty(value = "是否免费")
|
||||
private String modelFree;
|
||||
|
||||
/**
|
||||
* 模型优先级(值越大优先级越高)
|
||||
*/
|
||||
@ExcelProperty(value = "模型优先级(值越大优先级越高)")
|
||||
private Long priority;
|
||||
@ExcelProperty(value = "向量维度")
|
||||
private Integer modelDimension;
|
||||
|
||||
/**
|
||||
* 请求地址
|
||||
@@ -102,11 +85,5 @@ public class ChatModelVo implements Serializable {
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 模型维度
|
||||
*/
|
||||
private Integer dimension;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -48,10 +48,6 @@ public class ChatMessage extends TenantEntity {
|
||||
*/
|
||||
private String role;
|
||||
|
||||
/**
|
||||
* 扣除金额
|
||||
*/
|
||||
private Long deductCost;
|
||||
|
||||
/**
|
||||
* 累计 Tokens
|
||||
@@ -63,11 +59,6 @@ public class ChatMessage extends TenantEntity {
|
||||
*/
|
||||
private String modelName;
|
||||
|
||||
/**
|
||||
* 计费类型(1-token计费,2-次数计费)
|
||||
*/
|
||||
private String billingType;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
|
||||
@@ -48,15 +48,6 @@ public class ChatModel extends TenantEntity {
|
||||
*/
|
||||
private String modelDescribe;
|
||||
|
||||
/**
|
||||
* 模型价格
|
||||
*/
|
||||
private Long modelPrice;
|
||||
|
||||
/**
|
||||
* 计费类型
|
||||
*/
|
||||
private String modelType;
|
||||
|
||||
/**
|
||||
* 是否显示
|
||||
@@ -64,14 +55,9 @@ public class ChatModel extends TenantEntity {
|
||||
private String modelShow;
|
||||
|
||||
/**
|
||||
* 是否免费
|
||||
* 向量维度
|
||||
*/
|
||||
private String modelFree;
|
||||
|
||||
/**
|
||||
* 模型优先级(值越大优先级越高)
|
||||
*/
|
||||
private Long priority;
|
||||
private Integer modelDimension;
|
||||
|
||||
/**
|
||||
* 请求地址
|
||||
|
||||
@@ -41,7 +41,6 @@ public abstract class AbstractChatMessageService {
|
||||
messageBO.setContent(content);
|
||||
messageBO.setRole(role);
|
||||
messageBO.setModelName(chatRequest.getModel());
|
||||
messageBO.setBillingType(chatModelVo.getModelType());
|
||||
messageBO.setRemark(null);
|
||||
|
||||
chatMessageService.insertByBo(messageBO);
|
||||
|
||||
Reference in New Issue
Block a user