types

package
v1.9.26 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Document

type Document struct {
	Content    string            // The document text/chunk content
	SourcePath string            // File path or document identifier
	Metadata   map[string]string // Custom metadata (e.g., date, author, type, tags)
	ChunkIndex int               // Position of this chunk within the source document (0-based)
}

Document represents a document for reranking with content and metadata This is a generic structure that can be used across the RAG system

type Event

type Event struct {
	Type         string
	StrategyName string // Name of the component emitting the event (strategy name, "reranker", "fusion", etc.)
	Message      string
	Progress     *Progress
	Error        error
	TotalTokens  int     // For usage events
	Cost         float64 // For usage events
}

Event represents a RAG operation lifecycle event. This is the canonical RAG event type used by strategies, reranking, fusion, the RAG manager, and the runtime.

type Progress

type Progress struct {
	Current int
	Total   int
}

Progress represents progress within a multi-step operation (e.g., indexing, reranking).

Jump to

Keyboard shortcuts

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