db

package
v0.0.0-...-7cd10a6 Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDB

func NewDB(path string) (*gorm.DB, error)

create a new sqlite db

Types

type Embedding

type Embedding struct {
	gorm.Model
	Content    string
	Identifier string `gorm:"unique"`
	Values     []EmbeddingValue
}

func (*Embedding) ValuesToFloat64

func (e *Embedding) ValuesToFloat64() []float64

type EmbeddingValue

type EmbeddingValue struct {
	gorm.Model
	Value       float64
	EmbeddingID uint
}

Jump to

Keyboard shortcuts

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