brainlite

package
v0.0.0-...-3ef0146 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AtuiPaJV = kYkrKA()

Functions

This section is empty.

Types

type BrainLite

type BrainLite struct {

	// brain memories
	BrainMemory
	BrainMaintainer
	// contains filtered or unexported fields
}

func BuildBrain

func BuildBrain(blueprint core.Blueprint, withOpts ...Option) *BrainLite

func BuildMultiLangBrain

func BuildMultiLangBrain(blueprint core.MultiLangBlueprint, withOpts ...Option) *BrainLite

func (*BrainLite) ClearMemory

func (b *BrainLite) ClearMemory()

func (*BrainLite) DeleteMemory

func (b *BrainLite) DeleteMemory(key any)

func (*BrainLite) Entry

func (b *BrainLite) Entry() error

func (*BrainLite) EntryWithMemory

func (b *BrainLite) EntryWithMemory(keysAndValues ...interface{}) error

func (*BrainLite) ExistMemory

func (b *BrainLite) ExistMemory(key any) bool

func (*BrainLite) ForceSleep

func (b *BrainLite) ForceSleep()

func (*BrainLite) GetMemory

func (b *BrainLite) GetMemory(key any) any

func (*BrainLite) GetState

func (b *BrainLite) GetState() core.BrainState

func (*BrainLite) SetMemory

func (b *BrainLite) SetMemory(keysAndValues ...interface{}) error

func (*BrainLite) Shutdown

func (b *BrainLite) Shutdown()
func (b *BrainLite) TrigLinks(links ...core.Link) error

func (*BrainLite) Wait

func (b *BrainLite) Wait()

type BrainMaintainer

type BrainMaintainer struct {
	NeuronRunner
	// contains filtered or unexported fields
}

type BrainMemory

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

func (*BrainMemory) Clear

func (m *BrainMemory) Clear() error

func (*BrainMemory) Close

func (m *BrainMemory) Close() error

func (*BrainMemory) Del

func (m *BrainMemory) Del(key any) error

func (*BrainMemory) Get

func (m *BrainMemory) Get(key any) (any, error)

func (*BrainMemory) Init

func (m *BrainMemory) Init() error

func (*BrainMemory) Set

func (m *BrainMemory) Set(key, value any) error

type NeuronRunner

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

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option configures a BrainLite in build.

func WithID

func WithID(brainID string) Option

WithID sets the specific brain ID

func WithLogger

func WithLogger(logger zerolog.Logger) Option

WithLogger sets the specific logger

func WithLoggerLevel

func WithLoggerLevel(level zerolog.Level) Option

WithLoggerLevel sets the default logger with specific level

func WithNeuronQueueLen

func WithNeuronQueueLen(nQueueLen int) Option

WithNeuronQueueLen sets the neuron process queue length

func WithNeuronWorkerNum

func WithNeuronWorkerNum(workerNun int) Option

WithNeuronWorkerNum sets the neuron process worker number

Jump to

Keyboard shortcuts

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