pipelines
Classes
PipelinesClient
PipelinesClient(client: OWUIClientBase)
Bases: ResourceBase
Client for the Pipelines endpoints.
Pipelines allow extending Open WebUI's functionality using Python scripts that can intercept and modify requests/responses (filters) or add new capabilities (pipes).
- Code Reference client Classes OpenWebUI Attributes pipelines
Source code in src/owui_client/client_base.py
Functions
list
Get the list of configured pipeline servers.
This returns the available OpenAI API base URLs that are configured and capable of hosting pipelines.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing a list of pipeline server configurations. |
Example |
dict
|
|
dict
|
```json |
|
dict
|
{ "data": [ { "url": "http://localhost:9099", "idx": 0 } ] |
|
dict
|
} |
|
dict
|
``` |
Source code in src/owui_client/routers/pipelines.py
upload
Upload a pipeline file (.py) to a specific pipeline server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_path
|
str
|
The local path to the Python file to upload. |
required |
url_idx
|
int
|
The index of the pipeline server to upload to (from |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
The response from the pipeline server, typically containing details of the uploaded pipeline. |
Source code in src/owui_client/routers/pipelines.py
add
add(form: AddPipelineForm) -> dict
Add a pipeline by instructing the server to download it from a URL.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
form
|
AddPipelineForm
|
The form data containing the pipeline URL and server index. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
The response from the pipeline server, typically containing details of the added pipeline. |
Source code in src/owui_client/routers/pipelines.py
delete
delete(form: DeletePipelineForm) -> dict
Delete a pipeline from a pipeline server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
form
|
DeletePipelineForm
|
The form data containing the pipeline ID and server index. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
The response from the pipeline server confirming deletion. |
Source code in src/owui_client/routers/pipelines.py
get
Get the list of installed pipelines from a specific pipeline server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
url_idx
|
Optional[int]
|
The index of the pipeline server to query. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the list of installed pipelines on that server. |
Source code in src/owui_client/routers/pipelines.py
get_valves
Get the current valve values (configuration) for a specific pipeline.
Valves allow users to configure pipeline behavior (e.g., API keys, toggles).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pipeline_id
|
str
|
The ID of the pipeline. |
required |
url_idx
|
Optional[int]
|
The index of the pipeline server where the pipeline resides. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary of valve keys and their current values. |
Source code in src/owui_client/routers/pipelines.py
get_valves_spec
Get the specification of valves for a specific pipeline.
This includes details like variable names, types, and descriptions, which can be used to generate a configuration UI.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pipeline_id
|
str
|
The ID of the pipeline. |
required |
url_idx
|
Optional[int]
|
The index of the pipeline server where the pipeline resides. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
The JSON schema or specification of the pipeline's valves. |
Source code in src/owui_client/routers/pipelines.py
update_valves
Update the valve values for a specific pipeline.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pipeline_id
|
str
|
The ID of the pipeline. |
required |
form_data
|
dict
|
A dictionary containing the new values for the valves. |
required |
url_idx
|
Optional[int]
|
The index of the pipeline server where the pipeline resides. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
The updated valve configuration or confirmation from the server. |