Skip to content

qorzj/web_search_cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Web Search CLI

基于 Gemini 的命令行 Web 搜索工具,为 Deep Code 提供联网搜索能力。

安装

git clone https://github.com/qorzj/web_search_cli.git
cd web_search_cli
pip install -r requirements.txt
chmod +x web_search_cli.py

配置

编辑 web_search_cli.py,在 OPENAI_MODELS 中填入你自己的 Gemini API Key:

OPENAI_MODELS = [
    {
        "name": "gemini",
        "model": "gemini-3-flash-preview",
        "api_key": "<Your-API-Key>",
        "base_url": "https://generativelanguage.googleapis.com/v1beta/openai/",
    }
]

Gemini API Key 可以从 Google AI Studio 免费获取。

使用

集成到 Deep Code

~/.deepcode/settings.json 中添加 webSearchTool 字段,指向 web_search_cli.py 的完整路径:

{
  "env": {
    "MODEL": "deepseek-v4-pro",
    "BASE_URL": "https://api.deepseek.com",
    "API_KEY": "sk-..."
  },
  "thinkingEnabled": true,
  "webSearchTool": "/Users/.../web_search_cli/web_search_cli.py"
}

配置后 Deep Code 会自动调用该工具进行联网搜索。

命令行直接搜索

./web_search_cli.py "Python 3.13 new features"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages