Documentation
¶
Index ¶
- func Ptr[T any](v T) *T
- type Client
- type CompleteOptions
- type Completion
- type CompletionAccumulator
- type CompletionRequest
- type CompletionService
- type Content
- type Effort
- type Embedding
- type EmbeddingService
- type EmbeddingsRequest
- type Extraction
- type ExtractionRequest
- type ExtractionService
- type Image
- type Message
- type Model
- type ModelService
- type Rendering
- type RenderingRequest
- type RenderingService
- type RequestConfig
- type RequestOption
- type Rerank
- type RerankRequest
- type RerankService
- type ResearchRequest
- type ResearchResult
- type ResearchService
- type Schema
- type Scrape
- type ScrapeRequest
- type ScrapeService
- type SearchRequest
- type SearchResult
- type SearchService
- type Segment
- type SegmentRequest
- type SegmentService
- type Summary
- type SummaryRequest
- type SummaryService
- type Synthesis
- type SynthesisService
- type SynthesizeOptions
- type SynthesizeRequest
- type Tool
- type ToolCall
- type ToolResult
- type TranscribeOptions
- type TranscribeRequest
- type Transcription
- type TranscriptionService
- type Verbosity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
Models ModelService
Embeddings EmbeddingService
Completions CompletionService
Syntheses SynthesisService
Renderings RenderingService
Transcriptions TranscriptionService
Scrapes ScrapeService
Searches SearchService
Researches ResearchService
Segments SegmentService
Extractions ExtractionService
Summaries SummaryService
}
func New ¶
func New(url string, opts ...RequestOption) *Client
type CompleteOptions ¶
type CompleteOptions = provider.CompleteOptions
type Completion ¶
type Completion = provider.Completion
type CompletionAccumulator ¶
type CompletionAccumulator = provider.CompletionAccumulator
type CompletionRequest ¶
type CompletionRequest struct {
CompleteOptions
Model string
Messages []Message
}
type CompletionService ¶
type CompletionService struct {
Options []RequestOption
}
func NewCompletionService ¶
func NewCompletionService(opts ...RequestOption) CompletionService
func (*CompletionService) New ¶
func (r *CompletionService) New(ctx context.Context, input CompletionRequest, opts ...RequestOption) (*Completion, error)
func (*CompletionService) NewStream ¶
func (r *CompletionService) NewStream(ctx context.Context, input CompletionRequest, opts ...RequestOption) iter.Seq2[*provider.Completion, error]
type EmbeddingService ¶
type EmbeddingService struct {
Options []RequestOption
}
func NewEmbeddingService ¶
func NewEmbeddingService(opts ...RequestOption) EmbeddingService
func (*EmbeddingService) New ¶
func (r *EmbeddingService) New(ctx context.Context, input EmbeddingsRequest, opts ...RequestOption) (*Embedding, error)
type EmbeddingsRequest ¶
type Extraction ¶
type Extraction struct {
Text string `json:"text"`
}
type ExtractionRequest ¶
type ExtractionService ¶
type ExtractionService struct {
Options []RequestOption
}
func NewExtractionService ¶
func NewExtractionService(opts ...RequestOption) ExtractionService
func (*ExtractionService) New ¶
func (r *ExtractionService) New(ctx context.Context, input ExtractionRequest, opts ...RequestOption) (*Extraction, error)
type ModelService ¶
type ModelService struct {
Options []RequestOption
}
func NewModelService ¶
func NewModelService(opts ...RequestOption) ModelService
func (*ModelService) List ¶
func (r *ModelService) List(ctx context.Context, opts ...RequestOption) ([]Model, error)
type RenderingRequest ¶
type RenderingService ¶
type RenderingService struct {
Options []RequestOption
}
func NewRenderingService ¶
func NewRenderingService(opts ...RequestOption) RenderingService
func (*RenderingService) New ¶
func (r *RenderingService) New(ctx context.Context, input RenderingRequest, opts ...RequestOption) (*Rendering, error)
type RequestOption ¶
type RequestOption = func(*RequestConfig) error
func WithClient ¶
func WithClient(client *http.Client) RequestOption
func WithToken ¶
func WithToken(token string) RequestOption
func WithURL ¶
func WithURL(url string) RequestOption
type RerankRequest ¶
type RerankRequest = api.RerankRequest
type RerankService ¶
type RerankService struct {
Options []RequestOption
}
func NewRerankService ¶
func NewRerankService(opts ...RequestOption) *RerankService
func (*RerankService) New ¶
func (r *RerankService) New(ctx context.Context, input RerankRequest, opts ...RequestOption) ([]Rerank, error)
type ResearchRequest ¶
type ResearchRequest struct {
Input string
}
type ResearchResult ¶
type ResearchResult = api.ResearchResult
type ResearchService ¶
type ResearchService struct {
Options []RequestOption
}
func NewResearchService ¶
func NewResearchService(opts ...RequestOption) ResearchService
func (*ResearchService) New ¶
func (r *ResearchService) New(ctx context.Context, input ResearchRequest, opts ...RequestOption) (*ResearchResult, error)
type ScrapeRequest ¶
type ScrapeRequest struct {
URL string
}
type ScrapeService ¶
type ScrapeService struct {
Options []RequestOption
}
func NewScrapeService ¶
func NewScrapeService(opts ...RequestOption) ScrapeService
func (*ScrapeService) New ¶
func (r *ScrapeService) New(ctx context.Context, input ScrapeRequest, opts ...RequestOption) (*Scrape, error)
type SearchRequest ¶
type SearchRequest struct {
Query string
}
type SearchResult ¶
type SearchResult = api.SearchResult
type SearchService ¶
type SearchService struct {
Options []RequestOption
}
func NewSearchService ¶
func NewSearchService(opts ...RequestOption) SearchService
func (*SearchService) New ¶
func (r *SearchService) New(ctx context.Context, input SearchRequest, opts ...RequestOption) ([]SearchResult, error)
type SegmentRequest ¶
type SegmentService ¶
type SegmentService struct {
Options []RequestOption
}
func NewSegmentService ¶
func NewSegmentService(opts ...RequestOption) SegmentService
func (*SegmentService) New ¶
func (r *SegmentService) New(ctx context.Context, input SegmentRequest, opts ...RequestOption) ([]Segment, error)
type SummaryRequest ¶
type SummaryService ¶
type SummaryService struct {
Options []RequestOption
}
func NewSummaryService ¶
func NewSummaryService(opts ...RequestOption) SummaryService
func (*SummaryService) New ¶
func (r *SummaryService) New(ctx context.Context, input SummaryRequest, opts ...RequestOption) (*Summary, error)
type SynthesisService ¶
type SynthesisService struct {
Options []RequestOption
}
func NewSynthesisService ¶
func NewSynthesisService(opts ...RequestOption) SynthesisService
func (*SynthesisService) New ¶
func (r *SynthesisService) New(ctx context.Context, input SynthesizeRequest, opts ...RequestOption) (*Synthesis, error)
type SynthesizeOptions ¶
type SynthesizeOptions = provider.SynthesizeOptions
type SynthesizeRequest ¶
type SynthesizeRequest struct {
SynthesizeOptions
Model string
Input string
}
type ToolResult ¶
type ToolResult = provider.ToolResult
type TranscribeOptions ¶
type TranscribeOptions = provider.TranscribeOptions
type TranscribeRequest ¶
type TranscribeRequest struct {
TranscribeOptions
Model string
Name string
Reader io.Reader
}
type Transcription ¶
type Transcription = provider.Transcription
type TranscriptionService ¶
type TranscriptionService struct {
Options []RequestOption
}
func NewTranscriptionService ¶
func NewTranscriptionService(opts ...RequestOption) TranscriptionService
func (*TranscriptionService) New ¶
func (r *TranscriptionService) New(ctx context.Context, input TranscribeRequest, opts ...RequestOption) (*Transcription, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.