# network.sharedcomputer.chat.message

> Published by [sharedcomputer.network](https://lexicon.garden/identity/did:plc:n4mzxx6z4ehnswc7znswtfr2)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:n4mzxx6z4ehnswc7znswtfr2/network.sharedcomputer.chat.message)
- [Documentation](https://lexicon.garden/lexicon/did:plc:n4mzxx6z4ehnswc7znswtfr2/network.sharedcomputer.chat.message/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:n4mzxx6z4ehnswc7znswtfr2/network.sharedcomputer.chat.message/examples)

## Definitions

### `network.sharedcomputer.chat.message`

**Type**: `record`

One turn in a conversation. A reply uses its parent's key plus '.r' and the generation attempt, e.g. '.r0', '.r1'.

**Key**: `any`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `content` | `union` | Yes |  |
| `createdAt` | `string` (datetime) | Yes |  |
| `effort` | `ref` → `network.sharedcomputer.chat.defs#effort` | No | The reasoning effort (assistant message). |
| `error` | `string` | No |  |
| `generation` | `ref` → `network.sharedcomputer.chat.defs#generationRequest` | No | Asks the assistant to reply (user message). |
| `model` | `ref` → `network.sharedcomputer.chat.defs#modelRef` | No | The model that generated the response (assistant message). |
| `parent` | `string` (record-key) | No | The key of the previous message. Siblings are edits or regenerations. |
| `role` | `string` | Yes |  |
| `status` | `string` | No | Generation completion status (assistant message). |
| `usage` | `ref` → `network.sharedcomputer.chat.defs#usage` | No |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "One turn in a conversation. A reply uses its parent's key plus '.r' and the generation attempt, e.g. '.r0', '.r1'.",
      "key": "any",
      "record": {
        "properties": {
          "content": {
            "refs": [
              "network.sharedcomputer.chat.defs#plainContent",
              "network.sharedcomputer.chat.defs#encryptedContent"
            ],
            "type": "union"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "effort": {
            "description": "The reasoning effort (assistant message).",
            "ref": "network.sharedcomputer.chat.defs#effort",
            "type": "ref"
          },
          "error": {
            "maxLength": 3000,
            "type": "string"
          },
          "generation": {
            "description": "Asks the assistant to reply (user message).",
            "ref": "network.sharedcomputer.chat.defs#generationRequest",
            "type": "ref"
          },
          "model": {
            "description": "The model that generated the response (assistant message).",
            "ref": "network.sharedcomputer.chat.defs#modelRef",
            "type": "ref"
          },
          "parent": {
            "description": "The key of the previous message. Siblings are edits or regenerations.",
            "format": "record-key",
            "type": "string"
          },
          "role": {
            "knownValues": [
              "user",
              "assistant"
            ],
            "type": "string"
          },
          "status": {
            "description": "Generation completion status (assistant message).",
            "knownValues": [
              "pending",
              "complete",
              "error",
              "cancelled"
            ],
            "type": "string"
          },
          "usage": {
            "ref": "network.sharedcomputer.chat.defs#usage",
            "type": "ref"
          }
        },
        "required": [
          "role",
          "content",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "network.sharedcomputer.chat.message",
  "lexicon": 1
}
```
