# DeepSeek 函数调用教程 本目录包含第115篇 DeepSeek 函数调用教程及其可运行项目。 文件说明: - `115_DeepSeek函数调用教程:用Python构建可控工具调用.html`:教程正文 - `deepseek_function_calling.py`:完整的 DeepSeek 工具调用示例 - `verify_function_calling.py`:离线验证、工具白名单验证和可选真实 API 验证 - `requirements.txt`:固定依赖版本 - `test-results.json`:运行验证脚本后生成 ## 本地验证 ```powershell python -m venv .venv .\.venv\Scripts\python.exe -m pip install -r requirements.txt .\.venv\Scripts\python.exe verify_function_calling.py ``` 需要真实调用 DeepSeek 时,在当前终端设置 `DEEPSEEK_API_KEY`,然后运行: ```powershell $env:RUN_REAL_API = "1" .\.venv\Scripts\python.exe verify_function_calling.py ``` 运行真实测试会产生 API 调用费用;`test-results.json` 以本地实际结果为准。