Documentation
¶
Overview ¶
Package testutil provides test helpers for the agent SDK.
Index ¶
- type InmemMemory
- func (m *InmemMemory) Clear(ctx context.Context, scope interfaces.MemoryScope) error
- func (m *InmemMemory) Load(ctx context.Context, scope interfaces.MemoryScope, query string, ...) ([]interfaces.MemoryEntry, error)
- func (m *InmemMemory) Store(ctx context.Context, scope interfaces.MemoryScope, rec interfaces.MemoryRecord, ...) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InmemMemory ¶
type InmemMemory struct {
// contains filtered or unexported fields
}
InmemMemory is a mutex-protected in-memory interfaces.Memory for tests.
func NewInmemMemory ¶
func NewInmemMemory() *InmemMemory
NewInmemMemory returns an empty in-memory store.
func (*InmemMemory) Clear ¶
func (m *InmemMemory) Clear(ctx context.Context, scope interfaces.MemoryScope) error
Clear removes all memories matching scope.
func (*InmemMemory) Load ¶
func (m *InmemMemory) Load(ctx context.Context, scope interfaces.MemoryScope, query string, opts ...interfaces.LoadMemoryOption) ([]interfaces.MemoryEntry, error)
Load retrieves memories within scope.
func (*InmemMemory) Store ¶
func (m *InmemMemory) Store(ctx context.Context, scope interfaces.MemoryScope, rec interfaces.MemoryRecord, opts ...interfaces.StoreMemoryOption) (string, error)
Store persists a memory in scope and returns its ID.
Click to show internal directories.
Click to hide internal directories.