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.
const MaxEmbeddingSurfaceInputBytes
const MaxEmbeddingSurfaceInputBytes = 1 << 20
var ErrInvalidEmbeddingSurface
var ErrInvalidEmbeddingSurface = errors.New("report embedding surface is invalid or exceeds its budget")
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.
func validEmbeddingText
func validEmbeddingText(value string) bool