Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`。

Expand Down
13 changes: 13 additions & 0 deletions mindsearch/agent/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from dotenv import load_dotenv
from lagent.llms import (
GPTStyleAPI,
GPTAPI,
INTERNLM2_META,
HFTransformerCasualLM,
Expand Down Expand Up @@ -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,
Expand Down