tasks
Classes
TasksClient
TasksClient(client: OWUIClientBase)
Bases: ResourceBase
Client for the Tasks endpoints.
- Code Reference client Classes OpenWebUI Attributes tasks
Source code in src/owui_client/client_base.py
Functions
get_config
Get the global task configuration.
This includes settings for title generation, tags, autocomplete, etc.
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dict[str, Any]: The task configuration dictionary. |
Source code in src/owui_client/routers/tasks.py
update_config
update_config(form_data: TaskConfigForm) -> Dict[str, Any]
Update the global task configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
form_data
|
`TaskConfigForm`
|
The configuration settings to update. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dict[str, Any]: The updated task configuration dictionary. |
Source code in src/owui_client/routers/tasks.py
generate_title
Generate a title for a chat conversation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
form_data
|
Dict[str, Any]
|
Dictionary containing:
- |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dict[str, Any]: The chat completion response containing the generated title. |
Source code in src/owui_client/routers/tasks.py
generate_follow_ups
Generate follow-up questions for a chat conversation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
form_data
|
Dict[str, Any]
|
Dictionary containing:
- |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dict[str, Any]: The chat completion response containing generated follow-up questions. |
Source code in src/owui_client/routers/tasks.py
generate_tags
Generate tags for a chat conversation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
form_data
|
Dict[str, Any]
|
Dictionary containing:
- |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dict[str, Any]: The chat completion response containing generated tags. |
Source code in src/owui_client/routers/tasks.py
generate_image_prompt
Generate an image prompt based on the chat context.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
form_data
|
Dict[str, Any]
|
Dictionary containing:
- |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dict[str, Any]: The chat completion response containing the generated image prompt. |
Source code in src/owui_client/routers/tasks.py
generate_queries
Generate search or retrieval queries.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
form_data
|
Dict[str, Any]
|
Dictionary containing:
- |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dict[str, Any]: The chat completion response containing generated queries. |
Source code in src/owui_client/routers/tasks.py
generate_autocompletion
Generate text autocompletion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
form_data
|
Dict[str, Any]
|
Dictionary containing:
- |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dict[str, Any]: The chat completion response containing the autocompletion. |
Source code in src/owui_client/routers/tasks.py
generate_emoji
Generate an emoji based on the prompt.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
form_data
|
Dict[str, Any]
|
Dictionary containing:
- |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dict[str, Any]: The chat completion response containing the generated emoji. |
Source code in src/owui_client/routers/tasks.py
generate_moa_response
Generate a Mixture of Agents (MoA) response.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
form_data
|
Dict[str, Any]
|
Dictionary containing:
- |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dict[str, Any]: The chat completion response. |
Source code in src/owui_client/routers/tasks.py
list_tasks
List all active background tasks.
Returns:
| Type | Description |
|---|---|
Dict[str, List[str]]
|
Dict[str, List[str]]: Dictionary with 'tasks' key containing a list of task IDs. |
Source code in src/owui_client/routers/tasks.py
stop_task
Stop a specific background task.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task_id
|
str
|
The ID of the task to stop. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dict[str, Any]: Status dictionary (e.g., {"status": True}). |
Source code in src/owui_client/routers/tasks.py
list_tasks_by_chat
List background tasks associated with a specific chat.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
chat_id
|
str
|
The ID of the chat. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, List[str]]
|
Dict[str, List[str]]: Dictionary with 'task_ids' key containing a list of task IDs. |