Skip to main content

internal/report/embedding.go

internal/report · 60 lines · 5 declarations · source

Declarations

const EmbeddingSurfaceBudget

const EmbeddingSurfaceBudget = 8000

EmbeddingSurfaceBudget keeps one aggregate report from consuming an unbounded provider request. The title and summary are mandatory; optional reasons and findings are included whole while space remains, in their persisted order.

source

const MaxEmbeddingSurfaceInputBytes

const MaxEmbeddingSurfaceInputBytes = 1 << 20

source

var ErrInvalidEmbeddingSurface

var ErrInvalidEmbeddingSurface = errors.New("report embedding surface is invalid or exceeds its budget")

source

func EmbeddingSurface

func EmbeddingSurface(title, summary, importanceReason string, findingsJSON []byte) (string, error)

EmbeddingSurface is the stable text used only by the community-report semantic index.

source

func validEmbeddingText

func validEmbeddingText(value string) bool

source