Documentation
¶
Index ¶
- func New(ctx context.Context, cfg config.MemoryConfig) (core.AgentMemory, error)
- func Register()
- type InMemoryStore
- func (m *InMemoryStore) Append(ctx context.Context, sessionID string, msgs []core.Message) error
- func (m *InMemoryStore) Init(ctx context.Context) error
- func (m *InMemoryStore) Memorize(ctx context.Context, query string, answer string) error
- func (m *InMemoryStore) Read(ctx context.Context, sessionID string) ([]core.Message, error)
- func (m *InMemoryStore) Recall(ctx context.Context, query string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(ctx context.Context, cfg config.MemoryConfig) (core.AgentMemory, error)
New creates a new InMemoryStore.
Types ¶
type InMemoryStore ¶
type InMemoryStore struct {
// contains filtered or unexported fields
}
InMemoryStore is a naive implementation for testing. In a real scenario, this would use embeddings and cosine similarity. InMemoryStore is a naive implementation for testing. In a real scenario, this would use embeddings and cosine similarity.
Click to show internal directories.
Click to hide internal directories.