refactor: 将多个方法修改为静态方法以提高代码可读性和一致性
This commit is contained in:
@@ -49,8 +49,9 @@ class SearchKnowledgeTool(BaseTool):
|
||||
logger.error(f"知识库搜索工具执行失败: {str(e)}")
|
||||
return {"name": "search_knowledge", "content": f"知识库搜索失败: {str(e)}"}
|
||||
|
||||
@staticmethod
|
||||
def get_info_from_db(
|
||||
self, query_embedding: list, limit: int = 1, threshold: float = 0.5, return_raw: bool = False
|
||||
query_embedding: list, limit: int = 1, threshold: float = 0.5, return_raw: bool = False
|
||||
) -> Union[str, list]:
|
||||
"""从数据库中获取相关信息
|
||||
|
||||
|
||||
Reference in New Issue
Block a user