# place.hud.getChatEvents

> The answer the model is writing in a chat, live: an open stream of server-sent events (text/event-stream). Each event's data is one JSON object, typed by its $type: place.hud.chatDefs#textEvent (more words), #stepEvent (a tool call began or ended), #tileEvent (another tile), #artifactEvent (a version of an artifact made, or refused) or #doneEvent (the answer is whole, and the stream ends). Opened while an answer is being written, it sends what was written of it so far first; opened while none is, it sends nothing and ends. A comment, ping, comes every 25 seconds when nothing else does. Requires auth: the workspace's web session (its cookie) or a HUD access token as Bearer.

- Kind: query
- Authority: hud.place
- Lexicon: 1
- Published by [lexicons.hud.place](https://lexicon.garden/identity/did:plc:3tzbz4pml36u4mkresb6pdhv), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:3tzbz4pml36u4mkresb6pdhv/place.hud.getChatEvents)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:3tzbz4pml36u4mkresb6pdhv/place.hud.getChatEvents/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:3tzbz4pml36u4mkresb6pdhv/place.hud.getChatEvents/analytics)

## Query (`place.hud.getChatEvents`)

Type: query · GET

### Parameters (query string)

- `chat` (string, required)
  - Constraints: minLength: 12, maxLength: 12

### Output (text/event-stream)


### Errors

- `NotFound`: No chat of this id is the person's.
- `AuthRequired`: No live web session or HUD access token: sign in.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "The answer the model is writing in a chat, live: an open stream of server-sent events (text/event-stream). Each event's data is one JSON object, typed by its $type: place.hud.chatDefs#textEvent (more words), #stepEvent (a tool call began or ended), #tileEvent (another tile), #artifactEvent (a version of an artifact made, or refused) or #doneEvent (the answer is whole, and the stream ends). Opened while an answer is being written, it sends what was written of it so far first; opened while none is, it sends nothing and ends. A comment, ping, comes every 25 seconds when nothing else does. Requires auth: the workspace's web session (its cookie) or a HUD access token as Bearer.",
      "errors": [
        {
          "description": "No chat of this id is the person's.",
          "name": "NotFound"
        },
        {
          "description": "No live web session or HUD access token: sign in.",
          "name": "AuthRequired"
        }
      ],
      "output": {
        "encoding": "text/event-stream"
      },
      "parameters": {
        "properties": {
          "chat": {
            "maxLength": 12,
            "minLength": 12,
            "type": "string"
          }
        },
        "required": [
          "chat"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "description": "A chat's answer as the model writes it, as server-sent events.",
  "id": "place.hud.getChatEvents",
  "lexicon": 1
}
```
