vector256

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package vector256 represents a 256-dimensional float32 vector for pgvector

Index

Constants

This section is empty.

Variables

View Source
var VarLen = 256

Functions

This section is empty.

Types

type SearchEmbeddings

type SearchEmbeddings struct {
	Embeddings Vector256 `gorm:"type:vector(256);default:null" json:"-"`
}

SearchEmbeddings helper type for 256 specific

type Vector256

type Vector256 []float32

Vector256 represents a 256-dimensional float32 vector for pgvector and may be zero-length or a slice of 256 float32

func (*Vector256) Scan

func (v *Vector256) Scan(value any) error

Scan converts the Postgres database value back into a Go float32 slice

func (Vector256) Value

func (v Vector256) Value() (driver.Value, error)

Value converts the Go float32 slice into the '[0.1,0.2,...]' string format Postgres expects

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL