This PR adds a section to list all the available hooks with a short description. For each hook, an annotation display the most essential information: the input arguments, a practical example and additional links.
Try to solve #36 and #90
For anybody willing to contribute
If you want to help documenting the hooks, please ensure these elements are not missing:
Annotation number with bold heading
Input arguments description with code snippet
collapsible snippet example (??? example)
optional: any other warning box/additional info for tips, tricks and discouraged behaviors
collapsible note section with title: ??? note "Other resources" --> in this section please include the link to the hook Python reference in the documentation and any other useful links to other doc's pages.
Example
1. **Input arguments**
`user_message_json`, i.e. the JSON message sent via WebSocket done like this:
```JSON
{
"text": # user's message here
}
??? example
```python
from cat.mad_hatter.decorators import hook
@hook # default priority = 1
def before_cat_reads_message(user_message_json, cat):
user_message_json["text"] = "The original message has been replaced"
cat.working_memory["hacked"] = True
return user_message_json
```
??? note "Other resources"
- [Python reference]()
This PR adds a section to list all the available hooks with a short description. For each hook, an annotation display the most essential information: the input arguments, a practical example and additional links.
Try to solve #36 and #90
For anybody willing to contribute
If you want to help documenting the hooks, please ensure these elements are not missing:
??? example
)??? note "Other resources"
--> in this section please include the link to the hook Python reference in the documentation and any other useful links to other doc's pages.Example