Add the hidden param to event emitter examples

This commit is contained in:
0xThresh.eth 2024-12-29 16:47:37 -07:00
parent a59c7eb297
commit 4ab091a995

View File

@ -147,7 +147,7 @@ This is used to add statuses to a message while it is performing steps. These ca
await __event_emitter__(
{
"type": "status", # We set the type here
"data": {"description": "Message that shows up in the chat", "done": False},
"data": {"description": "Message that shows up in the chat", "done": False, "hidden": False},
# Note done is False here indicating we are still emitting statuses
}
)
@ -178,8 +178,9 @@ async def test_function(
await __event_emitter__(
{
"type": "status",
"data": {"description": "Completed a task message", "done": True},
"data": {"description": "Completed a task message", "done": True, "hidden": False},
# Note done is True here indicating we are done emitting statuses
# You can also set "hidden": True if you want to remove the status once the message is returned
}
)