storeMemory is the default Memory: an ai.History buffer optionally persisted to a store.
| 110 | // storeMemory is the default Memory: an ai.History buffer optionally |
| 111 | // persisted to a store. |
| 112 | type storeMemory struct { |
| 113 | mu sync.Mutex |
| 114 | store store.Store |
| 115 | key string |
| 116 | hist *ai.History |
| 117 | compaction MemoryCompaction |
| 118 | archive []ai.Message |
| 119 | retrieveAll bool |
| 120 | } |
| 121 | |
| 122 | func (m *storeMemory) Add(role, content string) { |
| 123 | m.mu.Lock() |
nothing calls this directly
no outgoing calls
no test coverage detected