rag

package
v0.0.0-...-389fe15 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Embedder

type Embedder struct {
	OpenAIClient *oAI.Client
}

func NewEmbedder

func NewEmbedder(OpenAIClient *oAI.Client) *Embedder

func (*Embedder) GetEmbedding

func (e *Embedder) GetEmbedding(ctx context.Context, text string) ([]float32, error)

type Service

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

func NewService

func NewService(db *db.LibSQL, embedder *Embedder) *Service

func (*Service) Answer

func (s *Service) Answer(ctx context.Context, question string) (string, error)

func (*Service) IndexExperience

func (s *Service) IndexExperience(ctx context.Context, experiences []model.Experience) error

func (*Service) IndexProjects

func (s *Service) IndexProjects(ctx context.Context, projects []model.Project) error

Jump to

Keyboard shortcuts

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