Documentation
¶
Overview ¶
Package cmd has the memory's commands and flags
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientCommands ¶
type ClientCommands struct {
DetailCommands
MemoryCommands
}
ClientCommands are the commands which call the memory's API
type DetailCommands ¶
type DetailCommands struct {
Details DetailsCmd `cmd:"" name:"details" help:"List the details of you, and the assistant, which every session knows." group:"MEMORY"`
DetailSet DetailSetCmd `cmd:"" name:"detail-set" help:"Set a detail, or decline to give it with --declined." group:"MEMORY"`
DetailForget DetailForgetCmd `cmd:"" name:"detail-forget" help:"Forget a detail, so it isn't known." group:"MEMORY"`
}
DetailCommands are the commands which get, set and forget the memory's details
type DetailForgetCmd ¶
type DetailForgetCmd struct {
Field string `` /* 136-byte string literal not displayed */
}
type DetailSetCmd ¶
type DetailsCmd ¶
type DetailsCmd struct{}
type Flags ¶
type Flags struct{}
Flags are the memory's flags for the server, which has none yet
func (Flags) WithMemory ¶
func (flags Flags) WithMemory(ctx server.Cmd, srv *servercmd.RunServer, store memory.Store, fn func(*memory.Memory) error, opts ...memory.Opt) error
WithMemory creates the memory, with the details in the store, and the options, such as the broadcaster it publishes its changes to, registers its HTTP handlers with the server, when there is one, and then calls the function with the memory, returning any error. The function adds it to a toolkit, so models have its system prompt, and tools.
type MemoriesCmd ¶
type MemoryCmd ¶
type MemoryCmd struct {
Key string `arg:"" name:"key" help:"Key of the memory, such as kitchen_lights."`
}
type MemoryCommands ¶
type MemoryCommands struct {
Memories MemoriesCmd `cmd:"" name:"memories" help:"List what's remembered, or search it, the most recent first." group:"MEMORY"`
Memory MemoryCmd `cmd:"" name:"memory" help:"Print what's remembered under a key." group:"MEMORY"`
MemoryRemember MemoryRememberCmd `cmd:"" name:"memory-remember" help:"Remember something under a key, from the arguments, or standard input." group:"MEMORY"`
MemoryForget MemoryForgetCmd `cmd:"" name:"memory-forget" help:"Forget what's remembered under a key, or a line of it, with --line." group:"MEMORY"`
}
MemoryCommands are the commands which list, get, remember and forget the memories
type MemoryForgetCmd ¶
type MemoryRememberCmd ¶
type MemoryRememberCmd struct {
Key string `arg:"" name:"key" help:"Key of the memory, such as kitchen_lights."`
Body []string `` /* 199-byte string literal not displayed */
Description string `name:"description" short:"d" required:"" help:"A line which describes what's remembered."`
Version string `name:"at" help:"Version of the memory it replaces, which memory prints, or none, to remember a new one."`
}