second commit
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user