瀏覽代碼

fix: search miss config

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

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

@@ -197,7 +197,7 @@ class LinkAIBot(Bot, OpenAIImage):
plugin_config = pconf("linkai")
if plugin_config.get("knowledge_base") and plugin_config.get("knowledge_base").get("search_miss_text_enabled"):
search_miss_similarity = plugin_config.get("knowledge_base").get("search_miss_similarity")
search_miss_text = plugin_config.get("knowledge_base").get("search_miss_text")
search_miss_text = plugin_config.get("knowledge_base").get("search_miss_suffix")
if not search_hit:
return search_miss_text
if search_miss_similarity and float(search_miss_similarity) > first_similarity:


+ 1
- 1
channel/wechat/wechat_message.py 查看文件

@@ -43,7 +43,7 @@ class WechatMessage(ChatMessage):
raise NotImplementedError("Unsupported note message: " + itchat_msg["Content"])
elif itchat_msg["Type"] == ATTACHMENT:
self.ctype = ContextType.FILE
self.content = TmpDir().path() + itchat_msg["FileName"]
self.content = TmpDir().path() + itchat_msg["FileName"] # content直接存临时目录路径
self._prepare_fn = lambda: itchat_msg.download(self.content)
elif itchat_msg["Type"] == SHARING:
self.ctype = ContextType.SHARING


+ 1
- 1
plugins/linkai/summary.py 查看文件

@@ -90,5 +90,5 @@ class LinkSummary:
for support_url in support_list:
if url.strip().startswith(support_url):
return True
logger.warn(f"[LinkSum] unsupported url, no need to process, url={url}")
logger.debug(f"[LinkSum] unsupported url, no need to process, url={url}")
return False

Loading…
取消
儲存