Documentation
¶
Index ¶
- type Client
- type Document
- type DocumentPage
- type DocumentService
- func (r *DocumentService) Delete(ctx context.Context, index string, ids []string, opts ...RequestOption) error
- func (r *DocumentService) List(ctx context.Context, index string, opts ...RequestOption) ([]Document, error)
- func (r *DocumentService) New(ctx context.Context, index string, input []Document, opts ...RequestOption) ([]Document, error)
- type Extraction
- type ExtractionRequest
- type ExtractionService
- type RequestConfig
- type RequestOption
- type Rerank
- type RerankRequest
- type RerankService
- type Segment
- type SegmentRequest
- type SegmentService
- type Summary
- type SummaryRequest
- type SummaryService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Models *openai.ModelService Embeddings *openai.EmbeddingService Completions *openai.ChatCompletionService Segments *SegmentService Extractions *ExtractionService Documents *DocumentService Summaries *SummaryService }
func New ¶
func New(url string, opts ...RequestOption) *Client
type DocumentPage ¶
type DocumentService ¶
type DocumentService struct {
Options []RequestOption
}
func NewDocumentService ¶
func NewDocumentService(opts ...RequestOption) *DocumentService
func (*DocumentService) Delete ¶
func (r *DocumentService) Delete(ctx context.Context, index string, ids []string, opts ...RequestOption) error
func (*DocumentService) List ¶
func (r *DocumentService) List(ctx context.Context, index string, opts ...RequestOption) ([]Document, error)
func (*DocumentService) New ¶
func (r *DocumentService) New(ctx context.Context, index string, input []Document, opts ...RequestOption) ([]Document, error)
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 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 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 SummaryRequest struct {
Content string `json:"content"`
}
type SummaryService ¶
type SummaryService struct {
Options []RequestOption
}
func NewSummaryService ¶
func NewSummaryService(opts ...RequestOption) *SummaryService
func (*SummaryService) New ¶
func (r *SummaryService) New(ctx context.Context, body SummaryRequest, opts ...RequestOption) (*Summary, error)
Click to show internal directories.
Click to hide internal directories.