Files
gochat/internal/pgvector_stub/vector.go
T
2026-06-04 15:44:48 +08:00

20 lines
514 B
Go

package pgvector
// Vector represents a vector for similarity search.
// Stub implementation for building without PostgreSQL/pgvector extension.
type Vector []float32
// NewVector creates a new vector from a slice of float32.
func NewVector(slice []float32) Vector {
return Vector(slice)
}
// String returns the string representation of the vector.
func (v Vector) String() string {
return ""
}
// Dimensions returns the number of dimensions in the vector.
func (v Vector) Dimensions() int {
return len(v)
}