fetch

package
v0.11.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Tools

func Tools(elicit *tool.Elicitation, extract Extract) []tool.Tool

Tools builds the fetch tool. With an elicitation, every not-yet-approved host requires user confirmation (remembered for the session) before the first request — the gate that keeps injected instructions from silently exfiltrating data or probing internal services. Redirects to unapproved hosts are refused.

Types

type Extract added in v0.11.6

type Extract func(ctx context.Context, instructions, input string) (string, error)

Extract runs a one-shot completion on a small utility model; the fetch tool uses it to answer a caller's `prompt` against page text so only the distilled answer reaches the conversation. Nil disables the `prompt` parameter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL