schema

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: Apache-2.0 Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DefaultMemorySchema = "memory"
	DefaultLLMSchema    = llmschema.DefaultSchema
	DefaultAuthSchema   = llmschema.DefaultAuthSchema
)
View Source
const MemoryListMax uint64 = 100

Variables

View Source
var Objects string
View Source
var Queries string

Functions

This section is empty.

Types

type Memory

type Memory struct {
	MemoryInsert `embed:""`
	CreatedAt    time.Time  `json:"created_at,omitempty" help:"Creation timestamp" readonly:""`
	ModifiedAt   *time.Time `json:"modified_at,omitempty" help:"Last modification timestamp" optional:"" readonly:""`
}

Memory represents a stored memory entry.

func (*Memory) Scan

func (m *Memory) Scan(row pg.Row) error

type MemoryInsert

type MemoryInsert struct {
	Session    uuid.UUID `json:"session" help:"Session owning the memory entry"`
	Key        string    `json:"key" help:"Text key for the memory entry"`
	MemoryMeta `embed:""`
}

MemoryInsert represents the fields required to create or replace a memory entry.

func (MemoryInsert) Insert

func (m MemoryInsert) Insert(bind *pg.Bind) (string, error)

func (MemoryInsert) Update

func (m MemoryInsert) Update(_ *pg.Bind) error

type MemoryList

type MemoryList struct {
	MemoryListRequest `embed:""`
	Count             uint      `json:"count" readonly:""`
	Body              []*Memory `json:"body,omitzero"`
}

MemoryList represents a paginated list of memory entries.

func (*MemoryList) Scan

func (list *MemoryList) Scan(row pg.Row) error

func (*MemoryList) ScanCount

func (list *MemoryList) ScanCount(row pg.Row) error

type MemoryListRequest

type MemoryListRequest struct {
	pg.OffsetLimit
	Session *uuid.UUID `json:"session,omitzero" help:"Restrict results to a session and recursively include its parent sessions" optional:""`
	Q       string     `` /* 190-byte string literal not displayed */
	Start   *time.Time `json:"start,omitempty" help:"Return memories on or after this timestamp" optional:""`
	End     *time.Time `json:"end,omitempty" help:"Return memories on or before this timestamp" optional:""`
}

MemoryListRequest represents a request to list or search memory entries.

func (MemoryListRequest) Query

func (req MemoryListRequest) Query() url.Values

func (MemoryListRequest) Select

func (req MemoryListRequest) Select(bind *pg.Bind, op pg.Op) (string, error)

type MemoryMeta

type MemoryMeta struct {
	Value *string `json:"value,omitempty" help:"Text value stored for the memory key" optional:""`
}

MemoryMeta represents the writable/updatable fields for a memory entry.

type MemorySelector

type MemorySelector struct {
	Session uuid.UUID `json:"session"`
	Key     string    `json:"key"`
}

MemorySelector selects a single memory entry by session and key.

func (MemorySelector) Select

func (sel MemorySelector) Select(bind *pg.Bind, op pg.Op) (string, error)

Jump to

Keyboard shortcuts

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