exa

package
v0.23.0 Latest Latest
Warning

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

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

Documentation

Overview

Package exa integrates Exa's Search and Contents APIs with the provider-neutral web contracts.

A Client implements both web.Searcher and web.Fetcher. Search requests use POST /search; page fetching uses POST /contents. Exa transport DTOs, search tuning, and response normalization remain private to this package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client implements web.Searcher against the Exa API. It exposes no vendor-specific surface, so a caller can substitute another search backend without touching the tool that consumes it.

func NewClient

func NewClient(config Config) (*Client, error)

NewClient requires the API key at construction so a missing credential fails at wiring rather than as an authorization error on a model's first search.

func (*Client) Fetch

func (c *Client) Fetch(ctx context.Context, request *web.FetchRequest) (*web.FetchResponse, error)

func (*Client) Search

func (c *Client) Search(ctx context.Context, request *web.SearchRequest) (*web.SearchResponse, error)

type Config

type Config struct {
	APIKey     string
	BaseURL    string
	HTTPClient *http.Client
}

Config takes an optional http.Client so the host keeps ownership of timeouts, proxying, and transport instrumentation instead of inheriting whatever this package would otherwise choose.

Jump to

Keyboard shortcuts

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