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`。 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,