<commit_before># Notification Websocket

## Connection

```shell
wscat -c "{notification_endpoint}"
  -H "Authorization: Bearer {{token}}"
```

> The above command will wait and display new notifications as they arrive

This endpoint allows you to receive notifications without constantly polling the server. Correct notification will be a JSON string with at least `event` field:

Field | Type   | Description
----- | ------ | -----------
event | string | See below

Events:

- `logout`: user session using same authentication key has been logged out (not yet implemented for OAuth authentication)
- `new`: new notification
- `read`: notification has been read
<commit_msg>Correct highlight<commit_after># Notification Websocket

## Connection

```bash
wscat -c "{notification_endpoint}"
  -H "Authorization: Bearer {{token}}"
```

> The above command will wait and display new notifications as they arrive

This endpoint allows you to receive notifications without constantly polling the server. Correct notification will be a JSON string with at least `event` field:

Field | Type   | Description
----- | ------ | -----------
event | string | See below

Events:

- `logout`: user session using same authentication key has been logged out (not yet implemented for OAuth authentication)
- `new`: new notification
- `read`: notification has been read

{'fraction_non_alphanumeric': 0.1080680977054034, 'fraction_numerical': 0.0, 'mean_word_length': 3.9705882352941178, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '246114', 'n_tokens_mistral': 346, 'n_tokens_neox': 323, 'n_words': 163}