mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-26 01:01:40 +00:00
feat(web): add Ollama Cloud as web search/extract backend
Adds support for Ollama Cloud's built-in web search and fetch APIs as a web backend option. This allows users with Ollama Cloud subscriptions to use web search without additional API costs (Tavily, Exa, etc). Changes: - Add 'ollama' backend to _get_backend() validation and backend_candidates - Implement _ollama_request() for authenticated API calls (Bearer token) - Add _ollama_search() calling https://ollama.com/api/web_search - Add _ollama_fetch() calling https://ollama.com/api/web_fetch - Add result normalization functions matching other backends - Wire up ollama backend in web_search_tool() and web_extract_tool() - Add Ollama Cloud provider to hermes tools setup menu - Update check_web_api_key() to include ollama backend Usage: Set OLLAMA_API_KEY in .env (from https://ollama.com) Set web.backend: ollama in config.yaml API endpoints: - web_search: POST https://ollama.com/api/web_search - web_fetch: POST https://ollama.com/api/web_fetch Docs: https://docs.ollama.com/capabilities/web-search
This commit is contained in:
parent
af9caec44f
commit
939ae01b32
2 changed files with 197 additions and 3 deletions
|
|
@ -238,6 +238,14 @@ TOOL_CATEGORIES = {
|
|||
{"key": "TAVILY_API_KEY", "prompt": "Tavily API key", "url": "https://app.tavily.com/home"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"name": "Ollama Cloud",
|
||||
"tag": "Web search and fetch (included with Ollama subscription)",
|
||||
"web_backend": "ollama",
|
||||
"env_vars": [
|
||||
{"key": "OLLAMA_API_KEY", "prompt": "Ollama API key", "url": "https://ollama.com"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"name": "Firecrawl Self-Hosted",
|
||||
"tag": "Free - run your own instance",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue