Documentation ¶
Index ¶
- Constants
- func Store(filePath string, embeddings []Document) error
- type Database
- func (db *Database) Add(doc Document)
- func (db *Database) GetEmbeddingByIndex(i int) []float64
- func (db *Database) GetEmbeddings() [][]float64
- func (db *Database) GetTextByIndex(i int) string
- func (db *Database) GetTexts() []string
- func (db *Database) RemoveByIndex(i int)
- func (db *Database) RemoveByText(text string)
- func (db *Database) Save() error
- type DatabaseInterface
- type Document
Constants ¶
View Source
const (
ErrorFileNotFound = "file not found"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Database ¶
type Database struct { Documents []Document // contains filtered or unexported fields }
func (*Database) GetEmbeddingByIndex ¶
func (*Database) GetEmbeddings ¶
func (*Database) GetTextByIndex ¶
func (*Database) RemoveByIndex ¶
func (*Database) RemoveByText ¶
type DatabaseInterface ¶
Click to show internal directories.
Click to hide internal directories.