refactor(module-llm):移除知识库嵌入中的用户ID字段
- 从 AsyncKnowledgeBase 类中移除了 getEntityId 方法 - 从 KnowledgeRagEmbedReqVO 类中移除了 entityId 字段 - 从 RagHttpService 的 knowledgeEmbed 方法调用中移除了 entityId 参数
This commit is contained in:
parent
972eab3262
commit
ba57e373fe
@ -80,8 +80,7 @@ public class AsyncKnowledgeBase {
|
||||
KnowledgeRagEmbedReqVO ragEmbedReqVo = new KnowledgeRagEmbedReqVO()
|
||||
.setFileId(String.valueOf(knowledge.getId()))
|
||||
.setFileName(knowledge.getDocumentName())
|
||||
.setFileInputStream(new ByteArrayInputStream(Objects.requireNonNull(getFileByte(knowledge.getFileUrl()))))
|
||||
.setEntityId(String.valueOf(getEntityId()));
|
||||
.setFileInputStream(new ByteArrayInputStream(Objects.requireNonNull(getFileByte(knowledge.getFileUrl()))));
|
||||
|
||||
ragHttpService.knowledgeEmbed(ragEmbedReqVo);
|
||||
|
||||
@ -92,15 +91,6 @@ public class AsyncKnowledgeBase {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前用户ID
|
||||
*
|
||||
* @return 用户ID
|
||||
*/
|
||||
public Long getEntityId () {
|
||||
return SecurityFrameworkUtils.getLoginUserId();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取文件字节数组
|
||||
*
|
||||
|
@ -215,7 +215,6 @@ public class RagHttpService {
|
||||
// 构建请求参数
|
||||
HttpResponse<String> response = Unirest.post(ragEmbed)
|
||||
.field("file_id", reqVO.getFileId())
|
||||
.field("entity_id", reqVO.getEntityId())
|
||||
.field("file", reqVO.getFileInputStream(), reqVO.getFileName())
|
||||
.asString();
|
||||
|
||||
|
@ -31,9 +31,4 @@ public class KnowledgeRagEmbedReqVO {
|
||||
* 文件流
|
||||
*/
|
||||
private ByteArrayInputStream fileInputStream;
|
||||
|
||||
/**
|
||||
* 用户Id
|
||||
*/
|
||||
private String entityId;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user