Skip to main content

install open-webui-pipelines module

Project description

Pipelines Logo

Pipelines: UI-Agnostic OpenAI API Plugin Framework

[!TIP] DO NOT USE PIPELINES!

If your goal is simply to add support for additional providers like Anthropic or basic filters, you likely don't need Pipelines . For those cases, Open WebUI Functions are a better fit—it's built-in, much more convenient, and easier to configure. Pipelines, however, comes into play when you're dealing with computationally heavy tasks (e.g., running large models or complex logic) that you want to offload from your main Open WebUI instance for better performance and scalability.

Welcome to Pipelines, an Open WebUI initiative. Pipelines bring modular, customizable workflows to any UI client supporting OpenAI API specs – and much more! Easily extend functionalities, integrate unique logic, and create dynamic workflows with just a few lines of code.

🚀 Why Choose Pipelines?

  • Limitless Possibilities: Easily add custom logic and integrate Python libraries, from AI agents to home automation APIs.
  • Seamless Integration: Compatible with any UI/client supporting OpenAI API specs. (Only pipe-type pipelines are supported; filter types require clients with Pipelines support.)
  • Custom Hooks: Build and integrate custom pipelines.

Examples of What You Can Achieve:

🔧 How It Works

Pipelines Workflow

Integrating Pipelines with any OpenAI API-compatible UI client is simple. Launch your Pipelines instance and set the OpenAI URL on your client to the Pipelines URL. That's it! You're ready to leverage any Python library for your needs.

⚡ Quick Start with Docker

[!WARNING] Pipelines are a plugin system with arbitrary code execution — don't fetch random pipelines from sources you don't trust.

Docker

For a streamlined setup using Docker:

  1. Run the Pipelines container:

    docker run -d -p 9099:9099 --add-host=host.docker.internal:host-gateway -v pipelines:/app/pipelines --name pipelines --restart always ghcr.io/open-webui/pipelines:main
    
  2. Connect to Open WebUI:

    • Navigate to the Settings > Connections > OpenAI API section in Open WebUI.
    • Set the API URL to http://localhost:9099 and the API key to 0p3n-w3bu!. Your pipelines should now be active.

[!NOTE] If your Open WebUI is running in a Docker container, replace localhost with host.docker.internal in the API URL.

  1. Manage Configurations:

    • In the admin panel, go to Admin Settings > Pipelines tab.
    • Select your desired pipeline and modify the valve values directly from the WebUI.

[!TIP] If you are unable to connect, it is most likely a Docker networking issue. We encourage you to troubleshoot on your own and share your methods and solutions in the discussions forum.

If you need to install a custom pipeline with additional dependencies:

  • Run the following command:

    docker run -d -p 9099:9099 --add-host=host.docker.internal:host-gateway -e PIPELINES_URLS="https://github.com/open-webui/pipelines/blob/main/examples/filters/detoxify_filter_pipeline.py" -v pipelines:/app/pipelines --name pipelines --restart always ghcr.io/open-webui/pipelines:main
    

Alternatively, you can directly install pipelines from the admin settings by copying and pasting the pipeline URL, provided it doesn't have additional dependencies.

That's it! You're now ready to build customizable AI integrations effortlessly with Pipelines. Enjoy!

Docker Compose together with Open WebUI

Using Docker Compose simplifies the management of multi-container Docker applications.

Here is an example configuration file docker-compose.yaml for setting up Open WebUI together with Pipelines using Docker Compose:

services:
  openwebui:
      image: ghcr.io/open-webui/open-webui:main
      ports:
        - "3000:8080"
      volumes:
        - open-webui:/app/backend/data

  pipelines:
      image: ghcr.io/open-webui/pipelines:main
      volumes:
        - pipelines:/app/pipelines
      restart: always
      environment:
        - PIPELINES_API_KEY=0p3n-w3bu!

volumes:
  open-webui: {}
  pipelines: {}

To start your services, run the following command:

docker compose up -d

You can then use http://pipelines:9099 (the name is the same as the service's name defined in docker-compose.yaml) as an API URL to connect to Open WebUI.

[!NOTE] The pipelines service is accessible only by openwebui Docker service and thus provide additional layer of security.

📦 Installation and Setup

Get started with Pipelines in a few easy steps:

  1. Ensure Python 3.11 is installed.

  2. Clone the Pipelines repository:

    git clone https://github.com/open-webui/pipelines.git
    cd pipelines
    
  3. Install the required dependencies:

    pip install -r requirements.txt
    
  4. Start the Pipelines server:

    sh ./start.sh
    

Once the server is running, set the OpenAI URL on your client to the Pipelines URL. This unlocks the full capabilities of Pipelines, integrating any Python library and creating custom workflows tailored to your needs.

Advanced Docker Builds

If you create your own pipelines, you can install them when the Docker image is built. For example, create a bash script with the snippet below to collect files from a path, add them as install URLs, and build the Docker image with the new pipelines automatically installed.

NOTE: The pipelines module will still attempt to install any package dependencies found at in your file headers at start time, but they will not be downloaded again.

# build in the specific pipelines
PIPELINE_DIR="pipelines-custom"
# assuming the above directory is in your source repo and not skipped by `.dockerignore`, it will get copied to the image
PIPELINE_PREFIX="file:///app"

# retrieve all the sub files
export PIPELINES_URLS=
for file in "$PIPELINE_DIR"/*; do
    if [[ -f "$file" ]]; then
        if [[ "$file" == *.py ]]; then
            if [ -z "$PIPELINES_URLS" ]; then
                PIPELINES_URLS="$PIPELINE_PREFIX/$file"
            else
                PIPELINES_URLS="$PIPELINES_URLS;$PIPELINE_PREFIX/$file"
            fi
        fi
    fi
done
echo "New Custom Install Pipes: $PIPELINES_URLS"

docker build --build-arg PIPELINES_URLS=$PIPELINES_URLS --build-arg MINIMUM_BUILD=true -f Dockerfile .

📂 Directory Structure and Examples

The /pipelines directory is the core of your setup. Add new modules, customize existing ones, and manage your workflows here. All the pipelines in the /pipelines directory will be automatically loaded when the server launches.

You can change this directory from /pipelines to another location using the PIPELINES_DIR env variable.

Integration Examples

Find various integration examples in the /examples directory. These examples show how to integrate different functionalities, providing a foundation for building your own custom pipelines.

🎉 Work in Progress

We’re continuously evolving! We'd love to hear your feedback and understand which hooks and features would best suit your use case. Feel free to reach out and become a part of our Open WebUI community!

Our vision is to push Pipelines to become the ultimate plugin framework for our AI interface, Open WebUI. Imagine Open WebUI as the WordPress of AI interfaces, with Pipelines being its diverse range of plugins. Join us on this exciting journey! 🌍

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

open_webui_pipelines-0.1.0.tar.gz (17.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

open_webui_pipelines-0.1.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file open_webui_pipelines-0.1.0.tar.gz.

File metadata

  • Download URL: open_webui_pipelines-0.1.0.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for open_webui_pipelines-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2d011e0a32f8488524a0250f2a03ec37f6e94c04596cec897f3da1ba03d3a496
MD5 87de818ad9d5ecad78e7be663d987c2d
BLAKE2b-256 994771514ff67a141f183121b1a28d36110a78c431293b52a1b1086bc774f50f

See more details on using hashes here.

File details

Details for the file open_webui_pipelines-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for open_webui_pipelines-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 29a17997eab6d1179e746ed6cb0b173bff4d2a847b41b7f84826216d23ac9b2c
MD5 be2437d85eaf8d01a690412a02d866f2
BLAKE2b-256 351d1db9fa955f4c022861c5046a8a710ccb03631cf79cf31ad95e7e2b6148f3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page