diff --git a/erniebot-agent/applications/erniebot_researcher/requirements.txt b/erniebot-agent/applications/erniebot_researcher/requirements.txt index 7ed66528..ae9866b2 100644 --- a/erniebot-agent/applications/erniebot_researcher/requirements.txt +++ b/erniebot-agent/applications/erniebot_researcher/requirements.txt @@ -1,4 +1,6 @@ gradio jsonlines md2pdf -langchain \ No newline at end of file +langchain +md2pdf +scikit-learn diff --git a/erniebot-agent/applications/erniebot_researcher/tools/semantic_citation_tool.py b/erniebot-agent/applications/erniebot_researcher/tools/semantic_citation_tool.py index 35e3b2fd..dbe8c569 100644 --- a/erniebot-agent/applications/erniebot_researcher/tools/semantic_citation_tool.py +++ b/erniebot-agent/applications/erniebot_researcher/tools/semantic_citation_tool.py @@ -1,6 +1,6 @@ import logging import string -from typing import Optional +from typing import Dict, List, Optional from erniebot_agent.tools.base import Tool @@ -35,9 +35,9 @@ def __init__(self, theta_min=0.4, theta_max=0.95, citation_num=5) -> None: self.theta_min = theta_min self.theta_max = theta_max self.citation_num = citation_num - self.recoder_cite_dict: dict = {} - self.recoder_cite_list: list = [] - self.recoder_cite_title: list = [] + self.recoder_cite_dict: Dict = {} + self.recoder_cite_list: List = [] + self.recoder_cite_title: List = [] def add_url_sentences(self, sententces: str, citation_faiss_research): sentence_splits = sententces.split("。")