作者 lixiang

删除无用代码

@@ -218,25 +218,6 @@ public class AiragResponseServiceImpl implements AiragResponseService { @@ -218,25 +218,6 @@ public class AiragResponseServiceImpl implements AiragResponseService {
218 emitter.complete(); 218 emitter.complete();
219 } 219 }
220 220
221 - /**  
222 - * 构建系统提示词  
223 - * @return 系统提示词  
224 - */  
225 - private String createSystemPrompt() {  
226 - return "你是一个严谨的信息处理助手,必须严格遵守以下规则:\n" +  
227 - "1. 严格基于参考内容回答,禁止任何超出参考内容的推断或想象\n" +  
228 - "2. 严格基于参考内容回答,禁止使用参考内容中与问题无关的内容\n" +  
229 - "3. 回答结构:\n" +  
230 - " - 首先用一句话直接回答问题核心(仅限参考内容中明确包含的信息)\n" +  
231 - " - 然后列出支持该答案的具体内容(可直接引用参考内容)\n" +  
232 - "4. 禁止以下行为:\n" +  
233 - " - 添加参考内容中不存在的信息\n" +  
234 - " - 在回答中提及'参考内容'等字样\n" +  
235 - " - 在回答中提及其他产品的功能\n" +  
236 - " - 进行任何推测性陈述\n" +  
237 - " - 使用模糊或不确定的表达\n" +  
238 - " - 参考内容为空时应该拒绝回答";  
239 - }  
240 221
241 /** 222 /**
242 * 构建用户提示 223 * 构建用户提示
@@ -251,17 +232,7 @@ public class AiragResponseServiceImpl implements AiragResponseService { @@ -251,17 +232,7 @@ public class AiragResponseServiceImpl implements AiragResponseService {
251 content; 232 content;
252 } 233 }
253 234
254 - /**  
255 - * 对llm模型进行提问  
256 - * @param emitter 流式返回  
257 - * @param logRecord 日志对象  
258 - * @param modelId 模型id  
259 - * @param systemPrompt 系统提示词  
260 - * @param userPrompt 用户提示词  
261 - * @param firstMatch 最相似的数据  
262 - * @param fileName 文件名称  
263 - * @param storedFileName 本地存储文件名称  
264 - */ 235 +
265 /** 236 /**
266 * 对llm模型进行提问 237 * 对llm模型进行提问
267 * @param emitter 流式返回 238 * @param emitter 流式返回
@@ -334,11 +305,7 @@ public class AiragResponseServiceImpl implements AiragResponseService { @@ -334,11 +305,7 @@ public class AiragResponseServiceImpl implements AiragResponseService {
334 } 305 }
335 306
336 307
337 - /**  
338 - * 创建结束标志,发送结束token  
339 - * @param metadataJson 元数据  
340 - * @param similarity 相似度  
341 - */ 308 +
342 /** 309 /**
343 * 创建结束标志,发送结束token 310 * 创建结束标志,发送结束token
344 * @param metadata 元数据(直接Map) 311 * @param metadata 元数据(直接Map)