SetMessages replaces the conversation slice. Used by /compact to write back the result of an ad-hoc strategy.
(m []api.Message)
| 52 | // SetMessages replaces the conversation slice. Used by /compact to write |
| 53 | // back the result of an ad-hoc strategy. |
| 54 | func (a *Agent) SetMessages(m []api.Message) { a.messages = m } |
| 55 | |
| 56 | // ClearMessages wipes the conversation history. |
| 57 | func (a *Agent) ClearMessages() { a.messages = a.messages[:0] } |