Help us shape the future of Go! Take the 2026 Go Developer Survey

providers

package
v1.11.4 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProviderModeAuto       = internalproviders.ProviderModeAuto
	ProviderModeCustom     = internalproviders.ProviderModeCustom
	ProviderModeTavily     = internalproviders.ProviderModeTavily
	ProviderModeSearXNG    = internalproviders.ProviderModeSearXNG
	ProviderModeJina       = internalproviders.ProviderModeJina
	ProviderModeExa        = internalproviders.ProviderModeExa
	ProviderModeLangSearch = internalproviders.ProviderModeLangSearch
	ProviderModeFirecrawl  = internalproviders.ProviderModeFirecrawl
	ProviderModeBing       = internalproviders.ProviderModeBing
	ProviderModeYou        = internalproviders.ProviderModeYou
	ProviderModeLinkup     = internalproviders.ProviderModeLinkup
	ProviderModeMojeek     = internalproviders.ProviderModeMojeek
	ProviderModeDuckDuckGo = internalproviders.ProviderModeDuckDuckGo
)

Variables

This section is empty.

Functions

func IsValidMode

func IsValidMode(mode string) bool

IsValidMode checks if the given mode is valid.

func NewDuckDuckGoProvider

func NewDuckDuckGoProvider() *internalproviders.DuckDuckGoProvider

NewDuckDuckGoProvider creates a no-API-key search provider (DuckDuckGo's HTML endpoint) - always available, no configuration required.

func NewExaProvider

func NewExaProvider() *internalproviders.ExaProvider

NewExaProvider creates a new Exa search provider.

func NewExaProviderWithAPIKey

func NewExaProviderWithAPIKey(apiKey string) *internalproviders.ExaProvider

NewExaProviderWithAPIKey creates an Exa search provider that uses apiKey.

func NewJinaProvider

func NewJinaProvider() *internalproviders.JinaProvider

NewJinaProvider creates a new Jina search provider.

func NewJinaProviderWithAPIKey

func NewJinaProviderWithAPIKey(apiKey string) *internalproviders.JinaProvider

NewJinaProviderWithAPIKey creates a Jina search provider that uses apiKey.

func NewLangSearchProvider

func NewLangSearchProvider() *internalproviders.LangSearchProvider

NewLangSearchProvider creates a LangSearch provider that uses the key in the LANGSEARCH_API_KEY environment variable.

func NewLangSearchProviderWithAPIKey

func NewLangSearchProviderWithAPIKey(apiKey string) *internalproviders.LangSearchProvider

NewLangSearchProviderWithAPIKey creates a LangSearch provider that uses apiKey.

func NewSearXNGProvider

func NewSearXNGProvider() *internalproviders.SearXNGProvider

NewSearXNGProvider creates a provider configured from environment variables. Reads SEARXNG_URL or SEARXNG_BASE_URL for the instance base URL.

func NewSearXNGProviderWithBaseURL

func NewSearXNGProviderWithBaseURL(baseURL string) *internalproviders.SearXNGProvider

NewSearXNGProviderWithBaseURL creates a provider targeting a specific URL.

func NewSearXNGProviderWithConfig

func NewSearXNGProviderWithConfig(baseURL, username, password string) *internalproviders.SearXNGProvider

NewSearXNGProviderWithConfig creates a provider with explicit URL and optional Basic Auth credentials. username and password are empty when the SearXNG instance has no HTTP Basic Auth.

func NewTavilyProvider

func NewTavilyProvider() *internalproviders.TavilyProvider

NewTavilyProvider creates a new Tavily search provider.

func NewTavilyProviderWithAPIKey

func NewTavilyProviderWithAPIKey(apiKey string) *internalproviders.TavilyProvider

NewTavilyProviderWithAPIKey creates a Tavily search provider that uses apiKey.

Types

type ProviderMode

type ProviderMode = internalproviders.ProviderMode

ProviderMode defines the search provider selection mode.

func ProviderModeFromEnv

func ProviderModeFromEnv() ProviderMode

ProviderModeFromEnv returns the configured provider mode from environment.

type ProviderOutput

type ProviderOutput = internalproviders.ProviderOutput

ProviderOutput represents the result of a provider search.

func Search(input SearchInput) (ProviderOutput, error)

Search performs a search using the configured provider mode.

type SearchHit

type SearchHit = internalproviders.SearchHit

SearchHit represents a single search result.

type SearchInput

type SearchInput = internalproviders.SearchInput

SearchInput represents the input for a search operation.

type SearchProvider

type SearchProvider = internalproviders.SearchProvider

SearchProvider defines the interface for search backends.

Jump to

Keyboard shortcuts

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