memory

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const INFINITE = -1

Variables

This section is empty.

Functions

This section is empty.

Types

type Stream

type Stream struct {
	// contains filtered or unexported fields
}

The stream memory retains all of the agent's observations in the time ordered sequence.

func NewStream

func NewStream(cap int, stratum chatter.Stratum) *Stream

Creates new stream memory that retains all of the agent's observations.

func (*Stream) Commit

func (s *Stream) Commit(e *thinker.Observation)

Commit new observation into memory.

func (*Stream) Context

func (s *Stream) Context(prompt chatter.Prompt) []fmt.Stringer

Builds the context window for LLM using incoming prompt.

func (*Stream) Purge added in v0.0.11

func (s *Stream) Purge()

type Void

type Void struct {
	// contains filtered or unexported fields
}

The void memory does not retain any observations.

func NewVoid

func NewVoid(stratum chatter.Stratum) *Void

Create the void memory that does not retain any observations.

func (*Void) Commit

func (s *Void) Commit(e *thinker.Observation)

Commit new observation into memory.

func (*Void) Context

func (s *Void) Context(prompt chatter.Prompt) []fmt.Stringer

Builds the context window for LLM using incoming prompt.

func (*Void) Purge added in v0.0.11

func (s *Void) Purge()

intentional the loss of memories, including facts, information and experiences

Jump to

Keyboard shortcuts

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