Documentation
¶
Index ¶
- Constants
- type Candidate
- type CaptureRequest
- type Entity
- type ListFilter
- type RecallFilter
- type RecallHit
- type Record
- type RecordEntity
- type ScoredCandidate
- type Scorer
- type SignalBreakdown
- type Source
- type Stats
- type Store
- func (s *Store) Capture(ctx context.Context, req CaptureRequest) (Record, error)
- func (s *Store) List(ctx context.Context, filter ListFilter) ([]Record, error)
- func (s *Store) Recall(ctx context.Context, filter RecallFilter) ([]RecallHit, error)
- func (s *Store) Stats(ctx context.Context) (Stats, error)
Constants ¶
View Source
const ( TypeFact = "fact" TypeDecision = "decision" TypeEvent = "event" TypeTask = "task" StatusDraft = "draft" StatusConfirmed = "confirmed" StatusSuperseded = "superseded" StatusExpired = "expired" StatusRejected = "rejected" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CaptureRequest ¶
type Entity ¶
type ListFilter ¶
type RecallHit ¶
type RecallHit struct {
Record Record `json:"record"`
RecallReason string `json:"recall_reason"`
Score int `json:"score"`
Signals SignalBreakdown `json:"signals,omitempty"`
}
type Record ¶
type Record struct {
ID string `gorm:"primaryKey" json:"id"`
Type string `gorm:"index" json:"type"`
Subject string `gorm:"index" json:"subject,omitempty"`
Predicate string `gorm:"index" json:"predicate,omitempty"`
Object string `json:"object,omitempty"`
Body string `json:"body,omitempty"`
Status string `gorm:"index" json:"status"`
Confidence string `gorm:"index" json:"confidence,omitempty"`
SourceURI string `json:"source_uri,omitempty"`
SourceSpan string `json:"source_span,omitempty"`
SupersedesID string `json:"supersedes_id,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
ExpiresAt *time.Time `json:"expires_at,omitempty"`
}
func BuildRecord ¶
func BuildRecord(req CaptureRequest) (Record, error)
type RecordEntity ¶
type RecordEntity struct {
RecordID string `gorm:"primaryKey" json:"record_id"`
EntityID string `gorm:"primaryKey" json:"entity_id"`
CreatedAt time.Time `json:"created_at"`
}
func (RecordEntity) TableName ¶
func (RecordEntity) TableName() string
type ScoredCandidate ¶
type ScoredCandidate struct {
Record Record
RecallReason string
Score int
Signals SignalBreakdown
}
type SignalBreakdown ¶
type SignalBreakdown struct {
KeywordFTS bool `json:"keyword_fts,omitempty"`
KeywordField string `json:"keyword_field,omitempty"`
SourceKind string `json:"source_kind,omitempty"`
SourceAuthority int `json:"source_authority,omitempty"`
Confidence int `json:"confidence,omitempty"`
Freshness int `json:"freshness,omitempty"`
TaskFitness int `json:"task_fitness,omitempty"`
}
type Source ¶
Click to show internal directories.
Click to hide internal directories.