# ai.syui.log.chat

> Published by [syui.syui.ai](https://lexicon.garden/identity/did:plc:vzsvtbtbnwn22xjqhcu3vd6y)

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:vzsvtbtbnwn22xjqhcu3vd6y/ai.syui.log.chat)
- [Documentation](https://lexicon.garden/lexicon/did:plc:vzsvtbtbnwn22xjqhcu3vd6y/ai.syui.log.chat/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:vzsvtbtbnwn22xjqhcu3vd6y/ai.syui.log.chat/examples)

## Definitions

### `ai.syui.log.chat`

**Type**: `record`

Record containing a chat message. Compatible with site.standard.document.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `path` | `string` | No | Combine with site URL to construct a canonical URL to the message. |
| `root` | `string` (at-uri) | No | AT-URI of the root message in a thread. |
| `site` | `string` (uri) | Yes | Points to a publication record (at://) or a publication URL (https://). |
| `tags` | `array` | No | Tags to categorize the message. |
| `langs` | `array` | No | Indicates human language of message content. |
| `title` | `string` | Yes | Title of the message or thread topic. |
| `parent` | `string` (at-uri) | No | AT-URI of the parent message being replied to. |
| `content` | `union` | No | Open union for content. Supports markdown and other formats via $type. |
| `updatedAt` | `string` (datetime) | No | Timestamp of the message's last edit. |
| `coverImage` | `blob` | No | Cover image. Less than 1MB. |
| `bskyPostRef` | `ref` → `com.atproto.repo.strongRef` | No | Strong reference to a Bluesky post. |
| `description` | `string` | No | A brief description or excerpt from the message. |
| `publishedAt` | `string` (datetime) | Yes | Timestamp of the message's publish time. |
| `textContent` | `string` | No | Plaintext representation of the message content. Should not contain markdown or other formatting. |
| `translations` | `ref` → `#translationMap` | No | Translations of the message in other languages. |

### `ai.syui.log.chat#markdown`

**Type**: `object`

Markdown content format.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `text` | `string` | Yes | Markdown text content. |

### `ai.syui.log.chat#translation`

**Type**: `object`

A translation of a chat message.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `title` | `string` | No |  |
| `content` | `string` | No |  |

### `ai.syui.log.chat#translationMap`

**Type**: `object`

Map of language codes to translations.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `en` | `ref` → `#translation` | No |  |
| `ja` | `ref` → `#translation` | No |  |

## Raw Schema

```json
{
  "id": "ai.syui.log.chat",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "site",
          "title",
          "publishedAt"
        ],
        "properties": {
          "path": {
            "type": "string",
            "description": "Combine with site URL to construct a canonical URL to the message."
          },
          "root": {
            "type": "string",
            "format": "at-uri",
            "description": "AT-URI of the root message in a thread."
          },
          "site": {
            "type": "string",
            "format": "uri",
            "description": "Points to a publication record (at://) or a publication URL (https://)."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 1280,
              "maxGraphemes": 128
            },
            "description": "Tags to categorize the message."
          },
          "langs": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "language"
            },
            "maxLength": 3,
            "description": "Indicates human language of message content."
          },
          "title": {
            "type": "string",
            "maxLength": 5000,
            "description": "Title of the message or thread topic.",
            "maxGraphemes": 500
          },
          "parent": {
            "type": "string",
            "format": "at-uri",
            "description": "AT-URI of the parent message being replied to."
          },
          "content": {
            "refs": [
              "#markdown"
            ],
            "type": "union",
            "closed": false,
            "description": "Open union for content. Supports markdown and other formats via $type."
          },
          "updatedAt": {
            "type": "string",
            "format": "datetime",
            "description": "Timestamp of the message's last edit."
          },
          "coverImage": {
            "type": "blob",
            "accept": [
              "image/*"
            ],
            "maxSize": 1000000,
            "description": "Cover image. Less than 1MB."
          },
          "bskyPostRef": {
            "ref": "com.atproto.repo.strongRef",
            "type": "ref",
            "description": "Strong reference to a Bluesky post."
          },
          "description": {
            "type": "string",
            "maxLength": 30000,
            "description": "A brief description or excerpt from the message.",
            "maxGraphemes": 3000
          },
          "publishedAt": {
            "type": "string",
            "format": "datetime",
            "description": "Timestamp of the message's publish time."
          },
          "textContent": {
            "type": "string",
            "description": "Plaintext representation of the message content. Should not contain markdown or other formatting."
          },
          "translations": {
            "ref": "#translationMap",
            "type": "ref",
            "description": "Translations of the message in other languages."
          }
        }
      },
      "description": "Record containing a chat message. Compatible with site.standard.document."
    },
    "markdown": {
      "type": "object",
      "required": [
        "text"
      ],
      "properties": {
        "text": {
          "type": "string",
          "maxLength": 1000000,
          "description": "Markdown text content.",
          "maxGraphemes": 100000
        }
      },
      "description": "Markdown content format."
    },
    "translation": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string",
          "maxLength": 5000,
          "maxGraphemes": 500
        },
        "content": {
          "type": "string",
          "maxLength": 1000000,
          "maxGraphemes": 100000
        }
      },
      "description": "A translation of a chat message."
    },
    "translationMap": {
      "type": "object",
      "properties": {
        "en": {
          "ref": "#translation",
          "type": "ref"
        },
        "ja": {
          "ref": "#translation",
          "type": "ref"
        }
      },
      "description": "Map of language codes to translations."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
