types

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 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         EventTye
	StrategyName string // Name of the component emitting the event (strategy name, "reranker", "fusion", etc.)
	Message      string
	Progress     *Progress
	Error        error
	TotalTokens  int64   // 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 EventTye added in v1.9.28

type EventTye string
const (
	EventTypeIndexingStarted  EventTye = "indexing_started"
	EventTypeIndexingProgress EventTye = "indexing_progress"
	EventTypeIndexingComplete EventTye = "indexing_complete"
	EventTypeUsage            EventTye = "usage"
	EventTypeError            EventTye = "error"
)

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