perplexity

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package perplexity provides a perplexity language model implementation for GoAI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chat

func Chat(modelID string, opts ...Option) provider.LanguageModel

Chat creates a perplexity language model for the given model ID.

Types

type Option

type Option func(*options)

Option configures the perplexity provider.

func WithAPIKey

func WithAPIKey(key string) Option

WithAPIKey sets a static API key for authentication.

func WithBaseURL

func WithBaseURL(url string) Option

WithBaseURL overrides the default API base URL.

func WithHTTPClient

func WithHTTPClient(c *http.Client) Option

WithHTTPClient sets a custom HTTP client for all requests.

func WithHeaders

func WithHeaders(h map[string]string) Option

WithHeaders sets additional HTTP headers sent with every request.

func WithTokenSource

func WithTokenSource(ts provider.TokenSource) Option

WithTokenSource sets a dynamic token source for authentication.

Jump to

Keyboard shortcuts

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