Documentation
¶
Index ¶
- type CohereRerank
- func (c *CohereRerank) Rerank(ctx context.Context, query string, documents []document.Document) ([]document.Document, error)
- func (c *CohereRerank) WithAPIKey(apiKey string) *CohereRerank
- func (c *CohereRerank) WithMaxChunksPerDoc(maxChunksPerDoc int) *CohereRerank
- func (c *CohereRerank) WithModel(model CohereRerankModel) *CohereRerank
- func (c *CohereRerank) WithTopN(topN int) *CohereRerank
- type CohereRerankModel
- type DallE
- func (d *DallE) AsFile(path string) *DallE
- func (d *DallE) AsImage() *DallE
- func (d *DallE) AsURL() *DallE
- func (d *DallE) Transform(ctx context.Context, input string) (any, error)
- func (d *DallE) WithClient(client *openai.Client) *DallE
- func (d *DallE) WithImageSize(imageSize DallEImageSize) *DallE
- type DallEImageFormat
- type DallEImageOutput
- type DallEImageSize
- type VisualQuestionAnswering
- func (v *VisualQuestionAnswering) Transform(ctx context.Context, input string, all bool) (any, error)
- func (v *VisualQuestionAnswering) WithImage(mediaFile string) *VisualQuestionAnswering
- func (v *VisualQuestionAnswering) WithModel(model string) *VisualQuestionAnswering
- func (v *VisualQuestionAnswering) WithToken(token string) *VisualQuestionAnswering
- type VisualQuestionAnsweringRequest
- type VisualQuestionAnsweringRequestInputs
- type VisualQuestionAnsweringResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CohereRerank ¶ added in v0.0.10
type CohereRerank struct {
// contains filtered or unexported fields
}
func NewCohereRerank ¶ added in v0.0.10
func NewCohereRerank() *CohereRerank
func (*CohereRerank) WithAPIKey ¶ added in v0.0.10
func (c *CohereRerank) WithAPIKey(apiKey string) *CohereRerank
func (*CohereRerank) WithMaxChunksPerDoc ¶ added in v0.0.10
func (c *CohereRerank) WithMaxChunksPerDoc(maxChunksPerDoc int) *CohereRerank
func (*CohereRerank) WithModel ¶ added in v0.0.10
func (c *CohereRerank) WithModel(model CohereRerankModel) *CohereRerank
func (*CohereRerank) WithTopN ¶ added in v0.0.10
func (c *CohereRerank) WithTopN(topN int) *CohereRerank
type CohereRerankModel ¶ added in v0.0.10
type CohereRerankModel = model.RerankModel
const ( CohereRerankScoreMetdataKey = "cohere-rerank-score" CohereRerankModelEnglishV20 CohereRerankModel = model.RerankModelEnglishV20 CohereRerankModelMultilingualV20 CohereRerankModel = model.RerankModelMultilingualV20 )
type DallE ¶
type DallE struct {
// contains filtered or unexported fields
}
func (*DallE) WithClient ¶
func (*DallE) WithImageSize ¶
func (d *DallE) WithImageSize(imageSize DallEImageSize) *DallE
type DallEImageFormat ¶
type DallEImageFormat string
const ( DallEImageFormatURL DallEImageFormat = "url" DallEImageFormatFile DallEImageFormat = "file" DallEImageFormatImage DallEImageFormat = "image" )
type DallEImageOutput ¶
type DallEImageOutput any
type DallEImageSize ¶
type DallEImageSize string
const ( DallEImageSize256 DallEImageSize = openai.CreateImageSize256x256 DallEImageSize512 DallEImageSize = openai.CreateImageSize512x512 DallEImageSize1024 DallEImageSize = openai.CreateImageSize1024x1024 )
type VisualQuestionAnswering ¶ added in v0.0.9
type VisualQuestionAnswering struct {
// contains filtered or unexported fields
}
func NewHFVisualQuestionAnswering ¶ added in v0.0.9
func NewHFVisualQuestionAnswering(mediaFile string) *VisualQuestionAnswering
func (*VisualQuestionAnswering) WithImage ¶ added in v0.0.9
func (v *VisualQuestionAnswering) WithImage(mediaFile string) *VisualQuestionAnswering
func (*VisualQuestionAnswering) WithModel ¶ added in v0.0.9
func (v *VisualQuestionAnswering) WithModel(model string) *VisualQuestionAnswering
func (*VisualQuestionAnswering) WithToken ¶ added in v0.0.9
func (v *VisualQuestionAnswering) WithToken(token string) *VisualQuestionAnswering
type VisualQuestionAnsweringRequest ¶ added in v0.0.9
type VisualQuestionAnsweringRequest struct {
Inputs VisualQuestionAnsweringRequestInputs `json:"inputs"`
}
type VisualQuestionAnsweringRequestInputs ¶ added in v0.0.9
type VisualQuestionAnsweringResponse ¶ added in v0.0.9
Click to show internal directories.
Click to hide internal directories.