From 826d4740cbddd96477350ca0c2e9460573d0eb40 Mon Sep 17 00:00:00 2001 From: qingzhong1 Date: Tue, 23 Jan 2024 13:04:19 +0000 Subject: [PATCH] update langchain --- erniebot-agent/applications/erniebot_researcher/README.md | 4 +--- .../applications/erniebot_researcher/tools/preprocessing.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/erniebot-agent/applications/erniebot_researcher/README.md b/erniebot-agent/applications/erniebot_researcher/README.md index 8545880c..bdfeae2d 100644 --- a/erniebot-agent/applications/erniebot_researcher/README.md +++ b/erniebot-agent/applications/erniebot_researcher/README.md @@ -80,12 +80,10 @@ export EB_AGENT_ACCESS_TOKEN= export AISTUDIO_ACCESS_TOKEN= ``` -如果用户有url链接,你可以传入存储url链接的txt或者json文件。 +如果用户有url链接,你可以传入存储url链接的txt。 在txt中,每一行存储文件的路径和对应的url链接,例如: 'https://zhuanlan.zhihu.com/p/659457816 erniebot_researcher_example/Ai_Agent的起源.md' -在json文件中,字典的每一个键是文件的路径,值是url链接,例如: -{"erniebot_researcher_example/Ai_Agent的起源.md":"https://zhuanlan.zhihu.com/p/659457816",...} 如果用户不传入url文件,则默认文件的路径为其url链接 用户可以自己传入文件摘要的存储路径。其中摘要需要用json文件存储。其中json文件内存储的是多个字典,每个字典有3组键值对,"page_content"存储文件的摘要,"url"是文件的url链接,"name"是文章的名字。例如: diff --git a/erniebot-agent/applications/erniebot_researcher/tools/preprocessing.py b/erniebot-agent/applications/erniebot_researcher/tools/preprocessing.py index a94f44a9..7745127d 100644 --- a/erniebot-agent/applications/erniebot_researcher/tools/preprocessing.py +++ b/erniebot-agent/applications/erniebot_researcher/tools/preprocessing.py @@ -257,7 +257,7 @@ def parse_arguments(): choices=["openai_embedding", "baizhong", "ernie_embedding"], help="['openai_embedding','baizhong','ernie_embedding']", ) - parser.add_argument("--url_path", type=str, default="", help="json file path to store url link") + parser.add_argument("--url_path", type=str, default="", help="txt file path to store url link") parser.add_argument( "--framework", type=str,