memoryannotations

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const SourceConclusion = "conclusion"

Variables

View Source
var DDL = []string{
	`CREATE TABLE IF NOT EXISTS goncho_memory_annotations (
		id INTEGER PRIMARY KEY AUTOINCREMENT,
		workspace_id TEXT NOT NULL,
		profile_id TEXT NOT NULL DEFAULT '',
		observer_peer_id TEXT NOT NULL,
		peer_id TEXT NOT NULL,
		memory_source TEXT NOT NULL,
		memory_id INTEGER NOT NULL,
		kind TEXT NOT NULL,
		value TEXT NOT NULL,
		source TEXT NOT NULL DEFAULT '',
		confidence REAL NOT NULL DEFAULT 1.0,
		created_at INTEGER NOT NULL,
		FOREIGN KEY(memory_id) REFERENCES goncho_conclusions(id) ON DELETE CASCADE,
		UNIQUE(workspace_id, profile_id, observer_peer_id, peer_id, memory_source, memory_id, kind, value)
	)`,
	`CREATE INDEX IF NOT EXISTS idx_goncho_memory_annotations_memory_kind ON goncho_memory_annotations(workspace_id, profile_id, observer_peer_id, peer_id, memory_source, memory_id, kind)`,
	`CREATE INDEX IF NOT EXISTS idx_goncho_memory_annotations_kind_value ON goncho_memory_annotations(kind, value)`,
}

Functions

func ConclusionFacts

func ConclusionFacts(content string) []string

func ConclusionFactsByMemoryID

func ConclusionFactsByMemoryID(ctx context.Context, db *sql.DB, ids []int64) (map[int64][]FactAnnotation, error)

func StoreConclusionFacts

func StoreConclusionFacts(ctx context.Context, db *sql.DB, workspaceID, profileID, observer, peer string, conclusionID int64, facts []string) error

Types

type FactAnnotation

type FactAnnotation struct {
	ID           int64
	MemorySource string
	MemoryID     int64
	Value        string
	Source       string
	Confidence   float64
}

Jump to

Keyboard shortcuts

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