mongo

package module
v0.0.0-...-40b5528 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package mongo provides a MongoDB store for embeddings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store is a MongoDB store.

It implements the Store interface.

func New

func New(collection *mongo.Collection) *Store

New creates a new MongoDB store.

func (*Store) Close

func (s *Store) Close() error

Close closes the MongoDB connection.

func (*Store) Get

func (s *Store) Get(ctx context.Context, utterance string) ([]float64, error)

Get gets a value from the store.

func (*Store) Set

func (s *Store) Set(ctx context.Context, keyValPair semanticrouter.Utterance) error

Set stores a value in the store.

Jump to

Keyboard shortcuts

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