Kaynağa Gözat

fix: search miss config

master
zhayujie 1 yıl önce
ebeveyn
işleme
dd082bd212
3 değiştirilmiş dosya ile 3 ekleme ve 3 silme
  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 Dosyayı Görüntüle

@@ -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 Dosyayı Görüntüle

@@ -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 Dosyayı Görüntüle

@@ -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

Yükleniyor…
İptal
Kaydet