瀏覽代碼

fix: knowledge base miss suffix bug

master
zhayujie 1 年之前
父節點
當前提交
792e940279
共有 1 個檔案被更改,包括 2 行新增2 行删除
  1. +2
    -2
      bot/linkai/link_ai_bot.py

+ 2
- 2
bot/linkai/link_ai_bot.py 查看文件

@@ -94,11 +94,11 @@ class LinkAIBot(Bot, OpenAIImage):
response = res.json()
reply_content = response["choices"][0]["message"]["content"]
total_tokens = response["usage"]["total_tokens"]
logger.info(f"[LINKAI] reply={reply_content}, total_tokens={total_tokens}")
self.sessions.session_reply(reply_content, session_id, total_tokens)
suffix = self._fecth_knowledge_search_suffix(response)
if suffix:
reply_content += suffix
logger.info(f"[LINKAI] reply={reply_content}, total_tokens={total_tokens}")
self.sessions.session_reply(reply_content, session_id, total_tokens)
return Reply(ReplyType.TEXT, reply_content)

else:


Loading…
取消
儲存