ollama-code

Web Fetch Tool (web_fetch)

This document describes the web_fetch tool for Ollama Code.

Description

Use web_fetch to fetch content from a specified URL and process it using an AI model. The tool takes a URL and a prompt as input, fetches the URL content, converts HTML to markdown, and processes the content with the prompt using a small, fast model.

Arguments

web_fetch takes two arguments:

How to use web_fetch with Ollama Code

To use web_fetch with Ollama Code, provide a URL and a prompt describing what you want to extract from that URL. The tool will ask for confirmation before fetching the URL. Once confirmed, the tool will fetch the content directly and process it using an AI model.

The tool automatically converts HTML to text, handles GitHub blob URLs (converting them to raw URLs), and upgrades HTTP URLs to HTTPS for security.

Usage:

web_fetch(url="https://example.com", prompt="Summarize the main points of this article")

web_fetch examples

Summarize a single article:

web_fetch(url="https://example.com/news/latest", prompt="Can you summarize the main points of this article?")

Extract specific information:

web_fetch(url="https://arxiv.org/abs/2401.0001", prompt="What are the key findings and methodology described in this paper?")

Analyze GitHub documentation:

web_fetch(url="https://github.com/QwenLM/Qwen/blob/main/README.md", prompt="What are the installation steps and main features?")

Important notes