mirror of
https://github.com/open-webui/docs
synced 2025-05-19 18:58:41 +00:00
Add the hidden param to event emitter examples
This commit is contained in:
parent
a59c7eb297
commit
4ab091a995
@ -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
|
||||
}
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user