provider.go 337 B

1234567891011
  1. package websearch
  2. import "context"
  3. // Provider is the interface every search backend must implement.
  4. type Provider interface {
  5. // Name returns the provider identifier ("brave" or "tavily").
  6. Name() string
  7. // Search executes a web search and returns results.
  8. Search(ctx context.Context, req SearchRequest) (*SearchResponse, error)
  9. }