From c092b7dac4ccd2d78508e8208cc89e184ffd3608 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E6=A2=93=E5=92=B8?= Date: Wed, 5 Feb 2025 18:13:30 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0searxng=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E5=BC=95=E6=93=8E=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + README_zh-CN.md | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 27a4b03..e6a3e27 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,7 @@ python -m mindsearch.app --lang en --model_format internlm_server --search_engin - `BraveSearch` for Brave search web api engine. - `GoogleSearch` for Google Serper web search api engine. - `TencentSearch` for Tencent search api engine. + - `SearxngSearch` for searxng search api engine. Please set your Web Search engine API key as the `WEB_SEARCH_API_KEY` environment variable unless you are using `DuckDuckGo`, or `TencentSearch` that requires secret id as `TENCENT_SEARCH_SECRET_ID` and secret key as `TENCENT_SEARCH_SECRET_KEY`. - `--asy`: deploy asynchronous agents. diff --git a/README_zh-CN.md b/README_zh-CN.md index 073a1b9..e3cc451 100644 --- a/README_zh-CN.md +++ b/README_zh-CN.md @@ -65,6 +65,7 @@ python -m mindsearch.app --lang en --model_format internlm_server --search_engin - `BraveSearch` 为 Brave 搜索引擎。 - `GoogleSearch` 为 Google Serper 搜索引擎。 - `TencentSearch` 为 Tencent 搜索引擎。 + - `SearxngSearch` 为 searxng 搜索引擎。 请将 DuckDuckGo 和 Tencent 以外的网页搜索引擎 API 密钥设置为 `WEB_SEARCH_API_KEY` 环境变量。如果使用 DuckDuckGo,则无需设置;如果使用 Tencent,请设置 `TENCENT_SEARCH_SECRET_ID` 和 `TENCENT_SEARCH_SECRET_KEY`。 From b26de7df03d111b39c74408940d9a31ee0504cc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E6=A2=93=E5=92=B8?= Date: Thu, 6 Feb 2025 17:39:46 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0openai=E9=A3=8E=E6=A0=BC?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E7=AB=AF=E6=94=AF=E6=8C=81(=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E4=BB=A3=E7=90=86=E5=9C=B0=E5=9D=80=E5=92=8C?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E5=90=8D=E7=A7=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mindsearch/agent/models.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/mindsearch/agent/models.py b/mindsearch/agent/models.py index 4682858..4dc0662 100644 --- a/mindsearch/agent/models.py +++ b/mindsearch/agent/models.py @@ -2,6 +2,7 @@ from dotenv import load_dotenv from lagent.llms import ( + GPTStyleAPI, GPTAPI, INTERNLM2_META, HFTransformerCasualLM, @@ -54,6 +55,17 @@ api_base=os.environ.get("OPENAI_API_BASE", "https://api.openai.com/v1/chat/completions"), ) +api_base = 'http://192.168.26.213:13000/v1/chat/completions' # oneapi +# model_name = "Baichuan2-Turbo" +model_name ="deepseek-r1-14b" +gptstyle = dict( + type=GPTStyleAPI, + model_type=model_name, + # key=os.environ.get("OPENAI_STYLE_API_KEY", "sk-IXgCTwuoEwxL1CiBE4744688D8094521B70f4aDeE6830c5e"), + # api_base=os.environ.get("OPENAI_STYLE_API_BASE",api_base), + key="sk-CZOUavQGNzkkQjZr626908A0011040F8B743C526F315D6Ee", + api_base=api_base, +) url = "https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions" qwen = dict( From 8ac2ef9a802b9b0a2e0787014d37ebd54c702672 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E6=A2=93=E5=92=B8?= Date: Thu, 6 Feb 2025 17:45:28 +0800 Subject: [PATCH 3/4] =?UTF-8?q?Revert=20"=E6=B7=BB=E5=8A=A0openai=E9=A3=8E?= =?UTF-8?q?=E6=A0=BC=E6=9C=8D=E5=8A=A1=E7=AB=AF=E6=94=AF=E6=8C=81(?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E4=BB=A3=E7=90=86=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E5=92=8C=E6=A8=A1=E5=9E=8B=E5=90=8D=E7=A7=B0)"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit b26de7df03d111b39c74408940d9a31ee0504cc1. 分离pr --- mindsearch/agent/models.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/mindsearch/agent/models.py b/mindsearch/agent/models.py index 4dc0662..4682858 100644 --- a/mindsearch/agent/models.py +++ b/mindsearch/agent/models.py @@ -2,7 +2,6 @@ from dotenv import load_dotenv from lagent.llms import ( - GPTStyleAPI, GPTAPI, INTERNLM2_META, HFTransformerCasualLM, @@ -55,17 +54,6 @@ api_base=os.environ.get("OPENAI_API_BASE", "https://api.openai.com/v1/chat/completions"), ) -api_base = 'http://192.168.26.213:13000/v1/chat/completions' # oneapi -# model_name = "Baichuan2-Turbo" -model_name ="deepseek-r1-14b" -gptstyle = dict( - type=GPTStyleAPI, - model_type=model_name, - # key=os.environ.get("OPENAI_STYLE_API_KEY", "sk-IXgCTwuoEwxL1CiBE4744688D8094521B70f4aDeE6830c5e"), - # api_base=os.environ.get("OPENAI_STYLE_API_BASE",api_base), - key="sk-CZOUavQGNzkkQjZr626908A0011040F8B743C526F315D6Ee", - api_base=api_base, -) url = "https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions" qwen = dict( From b3c18b9a3e4c75f3b2f789021eb399a7e6d31d84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E6=A2=93=E5=92=B8?= Date: Thu, 6 Feb 2025 17:49:02 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0openai=E9=A3=8E=E6=A0=BC?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E7=AB=AF=E6=94=AF=E6=8C=81(=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E4=BB=A3=E7=90=86=E5=9C=B0=E5=9D=80=E5=92=8C?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E5=90=8D=E7=A7=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mindsearch/agent/models.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/mindsearch/agent/models.py b/mindsearch/agent/models.py index 4682858..2b4f05c 100644 --- a/mindsearch/agent/models.py +++ b/mindsearch/agent/models.py @@ -2,6 +2,7 @@ from dotenv import load_dotenv from lagent.llms import ( + GPTStyleAPI, GPTAPI, INTERNLM2_META, HFTransformerCasualLM, @@ -55,6 +56,18 @@ "https://api.openai.com/v1/chat/completions"), ) +api_base = 'http://192.168.26.213:13000/v1/chat/completions' # oneapi +# model_name = "Baichuan2-Turbo" +model_name ="deepseek-r1-14b" +gptstyle = dict( + type=GPTStyleAPI, + model_type=model_name, + # key=os.environ.get("OPENAI_STYLE_API_KEY", "sk-IXgCTwuoEwxL1CiBE4744688D8094521B70f4aDeE6830c5e"), + # api_base=os.environ.get("OPENAI_STYLE_API_BASE",api_base), + key="sk-CZOUavQGNzkkQjZr626908A0011040F8B743C526F315D6Ee", + api_base=api_base, +) + url = "https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions" qwen = dict( type=GPTAPI,