Versions in this module Expand all Collapse all v0 v0.2.1 Oct 27, 2026 v0.2.0 Oct 20, 2026 Changes in this version + func GenerateVector[TElement, TInput any](ctx context.Context, generator Generator[TInput, *Of[TElement]], value TInput, ...) ([]TElement, error) + func Generate[TInput, TEmbedding any](ctx context.Context, generator Generator[TInput, TEmbedding], value TInput, ...) (TEmbedding, error) + type Binary []bool + func (v *Binary) UnmarshalJSON(data []byte) error + func (v Binary) Dimensions() int + func (v Binary) MarshalJSON() ([]byte, error) + type BoundGenerator struct + func Bind[I, E any](generator Generator[I, E]) *BoundGenerator + func (g *BoundGenerator) EmbeddingType() reflect.Type + func (g *BoundGenerator) Generate(ctx context.Context, values []any, options *Options) (*Generated[any], error) + func (g *BoundGenerator) InputType() reflect.Type + type Embedding struct + AdditionalProperties map[string]any + CreatedAt time.Time + ModelID string + Vector TVector + func (e *Embedding[TVector]) Dimensions() int + func (e *Embedding[TVector]) UnmarshalJSON(data []byte) error + func (e Embedding[TVector]) MarshalJSON() ([]byte, error) + type Generated struct + AdditionalProperties map[string]any + Embeddings []TEmbedding + Usage *message.UsageDetails + type GeneratedOf = Generated[*Of[T]] + type Generator interface + Generate func(ctx context.Context, values []TInput, options *Options) (*Generated[TEmbedding], error) + type Of = Embedding[VectorOf[T]] + type Options struct + AdditionalProperties map[string]any + Dimensions *int + ModelID *string + RawRepresentationFactory func(any) any + func (o *Options) Clone() *Options + type Pair struct + Embedding TEmbedding + Value TInput + func GenerateAndZip[TInput, TEmbedding any](ctx context.Context, generator Generator[TInput, TEmbedding], values []TInput, ...) ([]Pair[TInput, TEmbedding], error) + type Vector interface + Dimensions func() int + type VectorOf []T + func (v VectorOf[T]) Dimensions() int