search

package
v0.0.310 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BraveSearcher added in v0.0.22

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

BraveSearcher implements Searcher using the Brave Search API.

func NewBraveSearcher added in v0.0.22

func NewBraveSearcher(apiKey string, client *http.Client) *BraveSearcher

func (*BraveSearcher) Search added in v0.0.22

func (b *BraveSearcher) Search(ctx context.Context, query string, maxResults int) ([]Result, error)

type DuckDuckGoLite

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

DuckDuckGoLite implements Searcher using the DuckDuckGo lite HTML page.

func NewDuckDuckGoLite

func NewDuckDuckGoLite(client *http.Client) *DuckDuckGoLite

func (*DuckDuckGoLite) Search

func (d *DuckDuckGoLite) Search(ctx context.Context, query string, maxResults int) ([]Result, error)

type ExaMCPClient added in v0.0.247

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

ExaMCPClient implements search and fetch using Exa's remote MCP server.

func NewExaMCPClient added in v0.0.247

func NewExaMCPClient(url, apiKey string) *ExaMCPClient

func (*ExaMCPClient) FetchURL added in v0.0.247

func (e *ExaMCPClient) FetchURL(ctx context.Context, url string) (string, error)

FetchURL fetches a URL using Exa MCP's web_fetch_exa tool.

func (*ExaMCPClient) Search added in v0.0.247

func (e *ExaMCPClient) Search(ctx context.Context, query string, maxResults int) ([]Result, error)

type ExaSearcher added in v0.0.22

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

ExaSearcher implements Searcher using the Exa API.

func NewExaSearcher added in v0.0.22

func NewExaSearcher(apiKey string, client *http.Client) *ExaSearcher

func (*ExaSearcher) Search added in v0.0.22

func (e *ExaSearcher) Search(ctx context.Context, query string, maxResults int) ([]Result, error)

type GoogleSearcher added in v0.0.22

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

GoogleSearcher implements Searcher using Google Custom Search API.

func NewGoogleSearcher added in v0.0.22

func NewGoogleSearcher(apiKey, cx string, client *http.Client) *GoogleSearcher

func (*GoogleSearcher) Search added in v0.0.22

func (g *GoogleSearcher) Search(ctx context.Context, query string, maxResults int) ([]Result, error)

type PerplexitySearcher added in v0.0.117

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

PerplexitySearcher implements Searcher using the Perplexity Search API.

func NewPerplexitySearcher added in v0.0.117

func NewPerplexitySearcher(apiKey string, client *http.Client) *PerplexitySearcher

func (*PerplexitySearcher) Search added in v0.0.117

func (p *PerplexitySearcher) Search(ctx context.Context, query string, maxResults int) ([]Result, error)

type Result

type Result struct {
	Title   string
	URL     string
	Snippet string
}

Result is a single search result.

func ParseDuckDuckGoLiteHTML

func ParseDuckDuckGoLiteHTML(htmlText string, maxResults int) ([]Result, error)

ParseDuckDuckGoLiteHTML parses results from DuckDuckGo lite HTML.

type Searcher

type Searcher interface {
	Search(ctx context.Context, query string, maxResults int) ([]Result, error)
}

Searcher performs web searches.

func NewSearcher added in v0.0.22

func NewSearcher(cfg *config.Config) (Searcher, error)

NewSearcher creates a Searcher based on the config. Returns Exa MCP as the default if no provider is specified.

type TavilySearcher added in v0.0.117

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

TavilySearcher implements Searcher using the Tavily Search API.

func NewTavilySearcher added in v0.0.117

func NewTavilySearcher(apiKey string, client *http.Client) *TavilySearcher

func (*TavilySearcher) Search added in v0.0.117

func (t *TavilySearcher) Search(ctx context.Context, query string, maxResults int) ([]Result, error)

Jump to

Keyboard shortcuts

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