tavily

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package tavily is the Tavily search backend for the web_search built-in tool: one POST /search per call, Bearer-authenticated, mapped onto webtool.SearchResult. It passes webtooltest's Searcher contract.

Index

Constants

View Source
const DefaultBaseURL = "https://api.tavily.com"

DefaultBaseURL is Tavily's public endpoint. A deployment may point the adapter elsewhere (a proxy, a gateway) — never hard-code the public host in a caller.

View Source
const MaxResults = 5

MaxResults is the fixed hit count requested per search. The tool's input schema is deliberately just {query}; a bounded, deterministic result size belongs to the platform, not the model.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a webtool.Searcher backed by Tavily.

func New

func New(baseURL, key string) *Client

New returns a Client for baseURL (empty means DefaultBaseURL), authenticating with key.

func (*Client) Search

func (c *Client) Search(ctx context.Context, query string) ([]webtool.SearchResult, error)

Search runs one Tavily search and maps its hits in order.

Jump to

Keyboard shortcuts

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