]> git.giacomolli.uk - onechat/blobdiff - memory.go
Run the turns of an agent in a loop
[onechat] / memory.go
index 792fe21f42b2e69dbb85b1e114320124d5f10fa0..d7fff4ee1d6e6fef5a7c84919dd8605ee5fd6beb 100644 (file)
--- a/memory.go
+++ b/memory.go
@@ -543,6 +543,15 @@ func (m *Memory) View() string {
        return m.chat.Render()
 }
 
        return m.chat.Render()
 }
 
+// ViewWithout returns the chat view without the leaf lines of the messages in
+// skip.
+func (m *Memory) ViewWithout(skip map[int]bool) string {
+       m.mutex.Lock()
+       defer m.mutex.Unlock()
+
+       return m.chat.RenderWithout(skip)
+}
+
 // Len returns the number of messages in the log.
 func (m *Memory) Len() int {
        m.mutex.Lock()
 // Len returns the number of messages in the log.
 func (m *Memory) Len() int {
        m.mutex.Lock()