Open WebUI is an extensible, feature-rich, and user-friendly self-hosted AI platform designed to operate entirely offline.
Functions are like plugins for Open WebUI. We can create a custom Pipe Function that process inputs and generate responses by invoking Flowise Prediction API before returning results to the user. Through this, Flowise can be used in Open WebUI.
Setup
First, have Open WebUI up and running, you can refer to the Quickstart guide. From the left bottom, click your profile and Admin Panel
Open Functions tab, and add a new Function.
Name the Function, and add the following code:
After Function has been saved, enable it, and click the settings button to put in your Flowise URL and Flowise API Key:
Now when you refresh and click New Chat, you will be able to see the list of flows. You can modify the code to show:
Only Agentflows V2: f"{self.valves.flowise_url}/api/v1/chatflows?type=AGENTFLOW"
Only Chatflows: f"{self.valves.flowise_url}/api/v1/chatflows?type=CHATFLOW"
Only Assistants: f"{self.valves.flowise_url}/api/v1/chatflows?type=ASSISTANT"