augmenter

package
v0.2.21 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Key

func Key(embedder string, options *option.Options) string

func NewPDFSplitter added in v0.2.2

func NewPDFSplitter(maxChunk int) fsplitter.Splitter

NewPDFSplitter returns a Splitter that extracts printable text and delegates to a size-based splitter for chunking.

func WithMCPManager added in v0.2.6

func WithMCPManager(m *mcpmgr.Manager) func(*Service)

WithMCPManager attaches an MCP manager so the augmenter can index mcp: resources.

Types

type AugmentDocsInput

type AugmentDocsInput struct {
	Query           string
	Locations       []string
	Match           *option.Options
	Model           string
	MaxResponseSize int //size in byte
	MaxDocuments    int
	//based on meta['path'] include full path as long it does not go over //max response size
	IncludeFile bool
	TrimPath    string //trim path prefix
}

func (*AugmentDocsInput) Init

func (i *AugmentDocsInput) Init(ctx context.Context)

func (*AugmentDocsInput) Location

func (i *AugmentDocsInput) Location(location string) string

func (*AugmentDocsInput) Validate

func (i *AugmentDocsInput) Validate(ctx context.Context) error

type AugmentDocsOutput

type AugmentDocsOutput struct {
	Content       string
	Documents     []embSchema.Document
	DocumentsSize int
}

AugmentDocsOutput represents output from extraction

func (*AugmentDocsOutput) LoadDocuments

func (o *AugmentDocsOutput) LoadDocuments(ctx context.Context, fs afs.Service) []embSchema.Document

type CodeAugmenter

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

type DocsAugmenter

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

func NewDocsAugmenter

func NewDocsAugmenter(ctx context.Context, embeddingsModel string, embedder baseembed.Embedder, options ...option.Option) *DocsAugmenter

type Document

type Document embSchema.Document

func (Document) ProjectDocument

func (d Document) ProjectDocument() *graph.Document

func (Document) Size

func (d Document) Size() int

type Documents

type Documents []embSchema.Document

func (Documents) ProjectDocuments

func (d Documents) ProjectDocuments() graph.Documents

func (Documents) Size

func (d Documents) Size() int

type Service

type Service struct {
	DocsAugmenters shared.Map[string, *DocsAugmenter]
	// contains filtered or unexported fields
}

Service extracts structured information from LLM responses

func New

func New(finder embedder.Finder, opts ...func(*Service)) *Service

New creates a new extractor service

func (*Service) AugmentDocs

func (s *Service) AugmentDocs(ctx context.Context, input *AugmentDocsInput, output *AugmentDocsOutput) error

func (*Service) Method

func (s *Service) Method(name string) (svc.Executable, error)

Method returns the specified method

func (*Service) Methods

func (s *Service) Methods() svc.Signatures

Methods returns the service methods

func (*Service) Name

func (s *Service) Name() string

Name returns the service name

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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