server

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IS

type IS struct {
	v1.UnimplementedVectorStoreInternalServiceServer
	// contains filtered or unexported fields
}

IS is an internal server.

func NewInternal

func NewInternal(model string, r retriever, log logr.Logger) *IS

NewInternal creates an internal server.

func (*IS) Run

func (s *IS) Run(port int) error

Run starts the internal gRPC server.

func (*IS) SearchVectorStore

func (s *IS) SearchVectorStore(
	ctx context.Context,
	req *v1.SearchVectorStoreRequest,
) (*v1.SearchVectorStoreResponse, error)

SearchVectorStore searches documents for the given query from a vector store.

type S

type S struct {
	v1.UnimplementedVectorStoreServiceServer
	// contains filtered or unexported fields
}

S is a server.

func New

func New(
	store *store.S,
	fileGetClient fileGetClient,
	fileInternalClient fileInternalClient,
	vstoreClient vstoreClient,
	e embedder,
	model string,
	dimensions int,
	log logr.Logger,
) *S

New creates a server.

func (*S) CreateVectorStore

func (s *S) CreateVectorStore(
	ctx context.Context,
	req *v1.CreateVectorStoreRequest,
) (*v1.VectorStore, error)

CreateVectorStore creates a new vector store.

func (*S) CreateVectorStoreFile

func (s *S) CreateVectorStoreFile(
	ctx context.Context,
	req *v1.CreateVectorStoreFileRequest,
) (*v1.VectorStoreFile, error)

CreateVectorStoreFile adds a new file to the vector store.

func (*S) DeleteVectorStore

func (s *S) DeleteVectorStore(
	ctx context.Context,
	req *v1.DeleteVectorStoreRequest,
) (*v1.DeleteVectorStoreResponse, error)

DeleteVectorStore deletes a vector store.

func (*S) DeleteVectorStoreFile

func (s *S) DeleteVectorStoreFile(
	ctx context.Context,
	req *v1.DeleteVectorStoreFileRequest,
) (*v1.DeleteVectorStoreFileResponse, error)

DeleteVectorStoreFile deletes a file from the vector store.

func (*S) GetVectorStore

func (s *S) GetVectorStore(
	ctx context.Context,
	req *v1.GetVectorStoreRequest,
) (*v1.VectorStore, error)

GetVectorStore gets a vector store.

func (*S) GetVectorStoreByName

func (s *S) GetVectorStoreByName(
	ctx context.Context,
	req *v1.GetVectorStoreByNameRequest,
) (*v1.VectorStore, error)

GetVectorStoreByName gets a vector store by its name.

func (*S) GetVectorStoreFile

func (s *S) GetVectorStoreFile(
	ctx context.Context,
	req *v1.GetVectorStoreFileRequest,
) (*v1.VectorStoreFile, error)

GetVectorStoreFile gets a file from the vector store.

func (*S) ListVectorStoreFiles

func (s *S) ListVectorStoreFiles(
	ctx context.Context,
	req *v1.ListVectorStoreFilesRequest,
) (*v1.ListVectorStoreFilesResponse, error)

ListVectorStoreFiles lists files in the vector store.

func (*S) ListVectorStores

func (s *S) ListVectorStores(
	ctx context.Context,
	req *v1.ListVectorStoresRequest,
) (*v1.ListVectorStoresResponse, error)

ListVectorStores lists all vector stores.

func (*S) Run

func (s *S) Run(ctx context.Context, port int, authConfig config.AuthConfig, usage sender.UsageSetter) error

Run starts the gRPC server.

func (*S) Stop

func (s *S) Stop()

Stop stops the gRPC server.

func (*S) UpdateVectorStore

func (s *S) UpdateVectorStore(
	ctx context.Context,
	req *v1.UpdateVectorStoreRequest,
) (*v1.VectorStore, error)

UpdateVectorStore updates a vector store.

Jump to

Keyboard shortcuts

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