You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: backend/open_webui/tools/builtin.py
+20-16Lines changed: 20 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -2345,7 +2345,7 @@ class TaskItem(BaseModel):
2345
2345
2346
2346
2347
2347
asyncdeftasks(
2348
-
tasks: list[TaskItem],
2348
+
tasks: Optional[list[TaskItem]] =None,
2349
2349
overwrite: bool=True,
2350
2350
__chat_id__: str=None,
2351
2351
__message_id__: str=None,
@@ -2356,7 +2356,8 @@ async def tasks(
2356
2356
"""
2357
2357
Create or update a checklist of tasks tied to this chat.
2358
2358
Useful whenever a request involves multiple pieces of work that
2359
-
should be tracked individually.
2359
+
should be tracked individually. Call without arguments to retrieve
2360
+
the existing list.
2360
2361
2361
2362
By default the entire list is replaced (overwrite=true). Set
2362
2363
overwrite=false to patch specific items by id without discarding
@@ -2368,7 +2369,7 @@ async def tasks(
2368
2369
it completed before moving on, or cancel and replace it if the
2369
2370
approach changes.
2370
2371
2371
-
:param tasks: List of task items. Each must have: id (string, unique identifier), content (string, task description, required for new tasks), status (one of: pending, in_progress, completed, cancelled).
2372
+
:param tasks: Optional list of task items. Each item: id (string), content (string, required for new tasks), status (pending|in_progress|completed|cancelled). Leave empty to fetch without modifying.
2372
2373
:param overwrite: If true (default), replaces the entire task list. If false, updates/adds tasks by id while keeping existing ones.
2373
2374
:return: JSON with the full task list and summary counts
0 commit comments