inmem

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package inmem provides in-memory conversation storage. Use when the agent and worker run in the same process. For remote workers, use redis.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemoryConversation

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

func NewConversation added in v0.2.5

func NewConversation(opts ...Option) *InMemoryConversation

NewConversation creates a new in-memory conversation store.

func NewInMemoryConversation deprecated

func NewInMemoryConversation(opts ...Option) *InMemoryConversation

Deprecated: use NewConversation instead.

func (*InMemoryConversation) AddMessage

func (c *InMemoryConversation) AddMessage(ctx context.Context, id string, msg interfaces.Message) error

func (*InMemoryConversation) Clear

func (c *InMemoryConversation) Clear(ctx context.Context, id string) error

func (*InMemoryConversation) IsDistributed

func (c *InMemoryConversation) IsDistributed() bool

func (*InMemoryConversation) ListMessages

type Option

type Option func(*InMemoryConversation)

func WithMaxSize

func WithMaxSize(size int) Option

WithMaxSize sets the maximum number of messages to store per conversation.

Jump to

Keyboard shortcuts

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