docstore

package
v0.0.68 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitDocumentDBSet

func InitDocumentDBSet(dds *DocumentDBSet, basePath string) error

Types

type ChromemDocumentDB

type ChromemDocumentDB struct {
	// contains filtered or unexported fields
}

func NewChromemDocumentDB

func NewChromemDocumentDB(options ...Option) (*ChromemDocumentDB, error)

NewChromemDocumentDB initializes a new ChromemDocumentDB with the given options.

func (*ChromemDocumentDB) CreateCollection

func (db *ChromemDocumentDB) CreateCollection(
	ctx context.Context,
	name string,
	metadata map[string]string,
	embeddingFuncID spec.EmbeddingFuncID,
	apiKey string,
) (*spec.DocumentCollection, error)

CreateCollection creates a new document collection.

func (*ChromemDocumentDB) DeleteCollection

func (db *ChromemDocumentDB) DeleteCollection(
	ctx context.Context,
	id spec.DocumentCollectionID,
) error

DeleteCollection deletes a document collection.

func (*ChromemDocumentDB) GetCollection

GetCollection retrieves a document collection by ID.

func (*ChromemDocumentDB) ListCollections

ListCollections lists all document collections.

type DocumentDBSet

type DocumentDBSet struct {
	// contains filtered or unexported fields
}

DocumentDBSet manages multiple DocStore instances.

type Option

type Option func(*ChromemDocumentDB) error

Option is a function that configures a ChromemDocumentDB.

func WithBasePath

func WithBasePath(basePath string) Option

WithBasePath sets the base path of the ChromemDocumentDB.

func WithCompression

func WithCompression(compress bool) Option

WithCompression sets the compression flag of the ChromemDocumentDB.

func WithMetadata

func WithMetadata(metadata map[string]string) Option

WithMetadata sets the metadata of the ChromemDocumentDB.

func WithName

func WithName(name string) Option

WithName sets the name of the ChromemDocumentDB.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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