SystemMessageAt is like SystemMessage but stamps the message with an explicit creation time, letting callers (and tests) avoid the wall clock.
(createdAt time.Time, content string)
| 325 | // SystemMessageAt is like SystemMessage but stamps the message with an explicit |
| 326 | // creation time, letting callers (and tests) avoid the wall clock. |
| 327 | func SystemMessageAt(createdAt time.Time, content string) *Message { |
| 328 | return &Message{ |
| 329 | Message: chat.Message{ |
| 330 | Role: chat.MessageRoleSystem, |
| 331 | Content: content, |
| 332 | CreatedAt: createdAt.Format(time.RFC3339), |
| 333 | }, |
| 334 | } |
| 335 | } |
| 336 | |
| 337 | // Helper functions for creating SessionItems |
| 338 |
no outgoing calls