perplexity

package
v0.0.0-...-09e47d6 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDate

func NewDate(t time.Time) date

Types

type ContextSize

type ContextSize string
const (
	ContextSizeLow    ContextSize = "low"
	ContextSizeMedium ContextSize = "medium"
	ContextSizeHigh   ContextSize = "high"
)

type Perplexity

type Perplexity struct {
	*base.OpenAi
}

func New

func New(openAiOpts ...base.Opt) (*Perplexity, error)

func (*Perplexity) RequestOptionsType

func (*Perplexity) RequestOptionsType() reflect.Type

type RecencyFilter

type RecencyFilter string

type RequestOptions

type RequestOptions struct {
	SearchMode         SearchMode `structs:"search_mode,omitempty"`
	SearchRecency      string     `structs:"search_recency_filter,omitempty"`
	BeforeDate         date       `structs:"search_before_date_filter,string,omitempty"`
	AfterDate          date       `structs:"search_after_date_filter,string,omitempty"`
	LastUpdatedBefore  date       `structs:"last_updated_before_filter,string,omitempty"`
	LastUpdatedAfter   date       `structs:"last_updated_after_filter,string,omitempty"`
	SearchDomainFilter []string   `structs:"search_domain_filter,omitempty"`
	WebSearch          WebSearch  `structs:"web_search_options,omitempty"`
}

func (RequestOptions) ProviderRequestOptions

func (RequestOptions) ProviderRequestOptions()

type SearchMode

type SearchMode string
const (
	SearchModeWeb      SearchMode = "web"
	SearchModeAcademic SearchMode = "academic"
)

type SearchResult

type SearchResult struct {
	Title       string `json:"title"`
	URL         string `json:"url"`
	Date        string `json:"date"`
	LastUpdated string `json:"last_updated"`
}

type UserLocation

type UserLocation struct {
	Latitude  float64 `structs:"latitude,omitempty"`
	Longitude float64 `structs:"longitude,omitempty"`
	Country   string  `structs:"country,omitempty"`
}

type WebSearch

type WebSearch struct {
	ContextSize  ContextSize  `structs:"search_context_size,omitempty"`
	UserLocation UserLocation `structs:"user_location,omitempty"`
}

Jump to

Keyboard shortcuts

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