Documentation
¶
Index ¶
Constants ¶
View Source
const ( LayerPersonal = "personal" LayerOrg = "org" RoleUser = "user" RoleOrg = "org" LocalOwner = "local" )
Variables ¶
View Source
var ValidCategories = map[Category]bool{ CategoryPreference: true, CategoryDecision: true, CategoryFact: true, CategoryInsight: true, CategoryContext: true, CategoryGeneral: true, }
View Source
var ValidEdgeTypes = map[EdgeType]bool{ EdgeTemporal: true, EdgeSemantic: true, EdgeCausal: true, EdgeEntity: true, }
Functions ¶
This section is empty.
Types ¶
type Edge ¶
type Edge struct {
SourceID string `json:"source_id"`
TargetID string `json:"target_id"`
EdgeType EdgeType `json:"edge_type"`
Weight float64 `json:"weight"`
Metadata map[string]string `json:"metadata"`
CreatedAt time.Time `json:"created_at"`
}
Edge represents a directed relationship between two insights.
func (*Edge) MetadataJSON ¶
MetadataJSON returns metadata as a JSON string for storage.
func (*Edge) ParseMetadata ¶
ParseMetadata parses a JSON string into the Metadata field.
type Insight ¶
type Insight struct {
ID string `json:"id"`
Content string `json:"content"`
Category Category `json:"category"`
Importance int `json:"importance"`
Tags []string `json:"tags"`
Entities []string `json:"entities"`
Source string `json:"source"`
AccessCount int `json:"access_count"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt *time.Time `json:"deleted_at,omitempty"`
OwnerPrincipal string `json:"owner_principal"`
Layer string `json:"layer"`
ExternalRef string `json:"external_ref,omitempty"`
SourceURI string `json:"source_uri,omitempty"`
}
Insight represents a memory node in the knowledge graph.
func (*Insight) EntitiesJSON ¶
EntitiesJSON returns entities as a JSON string for storage.
func (*Insight) ParseEntities ¶
ParseEntities parses a JSON string into the Entities field.
Click to show internal directories.
Click to hide internal directories.