在 Hermes Agent 中使用 Ling
Hermes Agent 是一款轻量级 AI Agent 框架,支持工具调用、多步规划与 OpenAI 兼容 LLM 后端。通过将后端指向蚂蚁百灵,可以在 Hermes Agent 中以 Ling 驱动 Agent 工作流,适用于自动化任务、数据处理等场景。
你需要准备什么
- 创建令牌
- 安装 Hermes Agent
配置步骤
运行以下命令启动交互式配置向导:
hermes model按照提示依次完成以下步骤:
在提供商列表中选择
More providers...Select provider:
→ Nous Portal (Nous Research subscription)
OpenRouter (100+ models, pay-per-use)
Anthropic (Claude models — API key or Claude Code)
OpenAI Codex
GitHub Copilot (uses GITHUB_TOKEN or gh auth token)
Hugging Face Inference Providers (20+ open models)
More providers...
Cancel在扩展列表中选择
Custom endpoint (enter URL manually)Select provider:
GitHub Copilot ACP (spawns `copilot --acp --stdio`)
Google AI Studio (Gemini models — OpenAI-compatible endpoint)
Z.AI / GLM (Zhipu AI direct API)
Kimi / Moonshot (Moonshot AI direct API)
MiniMax (global direct API)
MiniMax China (domestic direct API)
Kilo Code (Kilo Gateway API)
OpenCode Zen (35+ curated models, pay-as-you-go)
OpenCode Go (open models, $10/month subscription)
AI Gateway (Vercel — 200+ models, pay-per-use)
Alibaba Cloud / DashScope Coding (Qwen + multi-provider)
→ Custom endpoint (enter URL manually)
Remove a saved custom provider
Cancel填写
https://api.ant-ling.com/v1 作为 API Base URLAPI base URL [e.g. https://api.example.com/v1]: https://api.ant-ling.com/v1前往 API 控制台 创建并填写百灵 API Key
API key [optional]: <YOUR_API_KEY>填写模型名称,示例值是
Ling-2.6-flash,可按需改为 Ling-2.6-1T、Ling-2.5-1T 或 Ring-1TModel name: Ling-2.6-flash填写上下文长度(可留空自动检测),配置即完成
Context length in tokens [leave blank for auto-detect]: 5000
Default model set to: Ling-2.6-flash (via https://api.ant-ling.com/v1)
💾 Saved to custom providers as "api.ant-ling.com" (edit in config.yaml)常见问题
AuthenticationError / 401 错误
工具调用返回格式不正确
百灵完整支持 OpenAI Function Calling 规范,请检查工具函数的参数 JSON Schema 是否合法。
任务执行超时
对于耗时较长的生成任务,建议开启 stream=True 以避免超时。同步调用的超时时间为 90 秒。
相关链接
Was this page helpful?
Last updated on