|
| 1 | +--- |
| 2 | +sidebar_position: 5 |
| 3 | +title: "π Getting Started with Functions" |
| 4 | +--- |
| 5 | + |
| 6 | +## Overview |
| 7 | + |
| 8 | +Did you know Open WebUI can connect to almost **anything**βnot just OpenAI-compatible APIs? |
| 9 | + |
| 10 | +Thanks to **Pipe Functions**, you can bring in services that donβt support the OpenAI API (like **Anthropic**, Home Assistant, Google Search, or *any* Python codebase). No restrictions on LLMs or AI models: if you can automate it in Python, you can turn it into a plugin for Open WebUI! |
| 11 | + |
| 12 | +This guide walks you through setting up your first Pipe Function, using the [Anthropic Pipe](https://openwebui.com/f/justinrahb/anthropic) plugin as an example. |
| 13 | + |
| 14 | +## What are Pipe Functions? |
| 15 | + |
| 16 | +Pipe Functions are βbring-your-own-model (or tool)β plugins: |
| 17 | + |
| 18 | +- **Act like models**: They show up as selectable models in your Open WebUI sidebar. |
| 19 | +- **Flexible**: Integrate with *any* backend, API, or workflowβno OpenAI compatibility required. |
| 20 | +- **No LLM required**: You can build plugins for search, home automation, weather, databases, or whatever you like. |
| 21 | +- **Pure Python**: All logic is Python code that runs *directly inside* your WebUI (so be cautious with what you enable!). |
| 22 | + |
| 23 | +## Step 1: Find a Pipe Function to Try |
| 24 | + |
| 25 | +Letβs integrate **Anthropic** with Open WebUIβeven though Anthropic only supports its own native API (not OpenAI-compatible endpoints)! |
| 26 | + |
| 27 | +1. Go to the [Anthropic Chat function page](https://openwebui.com/f/justinrahb/anthropic). |
| 28 | + |
| 29 | +2. Click **Get**. |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | +## Step 2: Import the Function to Open WebUI |
| 34 | + |
| 35 | +A modal will appear: |
| 36 | + |
| 37 | +1. Enter your Open WebUI URL (e.g., `http://localhost:3000`) in the prompt. |
| 38 | +2. Click **Import to Open WebUI**. |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | +Youβll be redirected **directly to the Functions Editor** within your running instance of Open WebUI. |
| 43 | + |
| 44 | +## Step 3: Review & Save |
| 45 | + |
| 46 | +- Youβll see all of the Pipe Functionβs Python code and configuration. |
| 47 | +- **Important:** Functions run arbitrary Python! Review the code for safety, and only install from sources you trust. |
| 48 | +- If youβre happy with the code, click **Save** to add it to your instance. |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | +## Step 4: Enable the Function |
| 54 | + |
| 55 | +Your new Pipe Function is now available, but **must be enabled**: |
| 56 | + |
| 57 | +1. Switch the toggler to enable the function. |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | +## Step 5: Enter any Required API Keys via Valves |
| 62 | + |
| 63 | +Some functions need credentials (like Anthropicβs API key): |
| 64 | + |
| 65 | +1. Click on the Gear icon next to the switch to open the **Valves** configuration. |
| 66 | +2. Input your required API key(s) for the Pipe Function. |
| 67 | + |
| 68 | +  |
| 69 | + |
| 70 | +## Step 6: Start Using Your New Plugin! |
| 71 | + |
| 72 | +- The new function now appears as a selectable βmodelβ in the chat interface. |
| 73 | +- Select `Anthropic` (or whatever you installed), and start chatting! |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | +## π Thatβs ItβYouβre Plugged Into Anything! |
| 78 | + |
| 79 | +- Pipe Functions open Open WebUI to *any* API, model, or automationβnot just OpenAI-compatible endpoints. |
| 80 | +- Think beyond LLMs: Integrate tools, APIs, local scripts, or your entire smart home. |
| 81 | + |
| 82 | +## β οΈ Security Notes |
| 83 | + |
| 84 | +- **Always** review function code before enabling. |
| 85 | +- Only use plugins from trusted sources. |
| 86 | +- You have the power to enhance (or break!) your WebUIβuse responsibly. |
| 87 | + |
| 88 | +### Next Steps & Learn More |
| 89 | + |
| 90 | +- [Pipe Functions Guide](https://docs.openwebui.com/features/plugin/functions/pipe) |
| 91 | +- [Browse community functions](https://openwebui.com/functions) |
| 92 | + |
| 93 | + |
| 94 | +π With Pipe Functions, your Open WebUI is limited *only by your imagination*! |
0 commit comments