Versions in this module Expand all Collapse all v0 v0.1.0 Nov 10, 2024 Changes in this version + const APIBaseURL + const BaseModel + const LargeModel + const SmallModel + type EmbeddingRequest struct + Input []string + Model string + type EmbeddingResponse struct + Data []struct{ ... } + Model string + Object string + Usage struct{ ... } + type Jina struct + APIBaseURL string + APIKey string + BatchSize int + InputText []string + Model string + StripNewLines bool + func NewJina(opts ...Option) (*Jina, error) + func (j *Jina) CreateEmbedding(ctx context.Context, texts []string) ([][]float32, error) + func (j *Jina) EmbedDocuments(ctx context.Context, texts []string) ([][]float32, error) + func (j *Jina) EmbedQuery(ctx context.Context, text string) ([]float32, error) + type Option func(p *Jina) + func WithAPIBaseURL(apiBaseURL string) Option + func WithAPIKey(apiKey string) Option + func WithBatchSize(batchSize int) Option + func WithModel(model string) Option + func WithStripNewLines(stripNewLines bool) Option