websearch

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package websearch hosts the web search provider abstraction used by the engine's WebSearchTool node. The Provider interface is the contract; one concrete implementation per supported engine lives alongside it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider interface {
	Search(ctx context.Context, query string, count int) (string, error)
}

Provider runs a search query against an external engine and returns a human-readable, LLM-consumable formatted string of results.

func New

func New(name, apiKey string) (Provider, error)

New returns a configured Provider for the given engine name. An empty apiKey is rejected for engines that require one. Unknown names produce an error so misconfiguration surfaces early.

Jump to

Keyboard shortcuts

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