Skip to content

Commit

Permalink
fix: plugin config not exist warning
Browse files Browse the repository at this point in the history
  • Loading branch information
zhayujie committed Oct 23, 2023
1 parent aaed3f9 commit 1a9edb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bot/linkai/link_ai_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def _fecth_knowledge_search_suffix(self, response) -> str:
first_similarity = response.get("knowledge_base").get("first_similarity")
logger.info(f"[LINKAI] knowledge base, search_hit={search_hit}, first_similarity={first_similarity}")
plugin_config = pconf("linkai")
if plugin_config.get("knowledge_base") and plugin_config.get("knowledge_base").get("search_miss_text_enabled"):
if plugin_config and 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_suffix")
if not search_hit:
Expand Down

0 comments on commit 1a9edb6

Please sign in to comment.