sema-docs 1.23.0

Canonical structured documentation for Sema builtins/special forms; powers LSP hover/completion and REPL apropos
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
---
name: "conversation/add-message"
module: "conversation"
params: [{ name: conv, type: conversation }, { name: role, type: keyword }, { name: content, type: string }]
returns: "conversation"
---

Append a message with the given role to the conversation without calling the model, returning a new conversation. Role must be `:system`, `:user`, `:assistant`, or `:tool`.

```sema
(conversation/add-message conv :assistant "Sure, I can help with that.")
```