From 533e8233c67f25d6e2ecb62a59fe4209bd129eaa Mon Sep 17 00:00:00 2001 From: ParthSareen Date: Tue, 23 Sep 2025 18:12:39 -0700 Subject: [PATCH] cleanup --- examples/README.md | 21 ++++++++++++++++--- ...-search-and-fetch.py => web-search-mcp.py} | 0 .../{web-search-fetch.py => web-search.py} | 0 3 files changed, 18 insertions(+), 3 deletions(-) rename examples/{mcp-web-search-and-fetch.py => web-search-mcp.py} (100%) rename examples/{web-search-fetch.py => web-search.py} (100%) diff --git a/examples/README.md b/examples/README.md index 0b142b6..8c695ef 100644 --- a/examples/README.md +++ b/examples/README.md @@ -43,15 +43,30 @@ See [ollama/docs/api.md](https://github.com/ollama/ollama/blob/main/docs/api.md) `OLLAMA_API_KEY` is required. You can get one from [ollama.com/settings/keys](https://ollama.com/settings/keys). -- [web-search-fetch.py](web-search-fetch.py) +- [web-search.py](web-search.py) #### MCP server ```sh -uv run examples/mcp-web-search-and-fetch.py +uv run examples/web-search-mcp.py ``` -- [mcp_web_search_crawl_server.py](mcp_web_search_crawl_server.py) +Configuration to use with an MCP client: + +```json +{ + "mcpServers": { + "web_search": { + "type": "stdio", + "command": "uv", + "args": ["run", "path/to/ollama-python/examples/web-search-mcp.py"], + "env": { "OLLAMA_API_KEY": "api-key" } + } + } +} +``` + +- [web-search-mcp.py](web-search-mcp.py) ### Multimodal with Images - Chat with a multimodal (image chat) model diff --git a/examples/mcp-web-search-and-fetch.py b/examples/web-search-mcp.py similarity index 100% rename from examples/mcp-web-search-and-fetch.py rename to examples/web-search-mcp.py diff --git a/examples/web-search-fetch.py b/examples/web-search.py similarity index 100% rename from examples/web-search-fetch.py rename to examples/web-search.py