rag

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OpenAIConfig

type OpenAIConfig struct {
	EmbedModel string
	Endpoint   string
	LLMModel   string
	Token      string
}

type RAG

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

func New

func New(filename string, config *OpenAIConfig) (*RAG, error)

func (*RAG) AddDocument

func (r *RAG) AddDocument(id string, document string) error

func (*RAG) Ask

func (r *RAG) Ask(query string) (string, error)

func (*RAG) Search

func (r *RAG) Search(query string) ([]chromem.Result, error)

Jump to

Keyboard shortcuts

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