wangqifan 3 лет назад
Родитель
Сommit
2efc911d7d
1 измененных файлов с 4 добавлено и 5 удалено
  1. 4 5
      src/chat-pdf/chat-pdf.service.ts

+ 4 - 5
src/chat-pdf/chat-pdf.service.ts

@@ -271,15 +271,14 @@ export class ChatPdfService {
             }
         }
         const content = dedent`${defSysMsg}'
-        下面的内容是你从客服指南中学习到的。
         根据相关性从高到低排序。 '
-        You can only answer according to the following content:
+        这是用户提出的问题:
+        ${q}
+        你只能根据用户的问题,以下面的内容为准进行回答:
         \`\`\`
         ${context.join('\n')}
         \`\`\`
-        You need to carefully consider your answer to ensure that it is based on the context. 
-        If the context does not mention the content or it is uncertain whether it is correct, 
-        please answer "这个问题无法从客服指南中找到答案,请询问更准确的问题。"
+        你要确保你的回答全部基于上面的问题和内容,如果无法找到答案,你需要根据给你设定的角色表述你不能回答这个问题。
         You must use Chinese to respond.`
         try {
             const response = await this.openai.createChatCompletion({