You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/features/code-execution/index.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,10 +7,10 @@ Open WebUI offers powerful code execution capabilities directly within your chat
7
7
8
8
## Key Features
9
9
10
-
-**Python Code Execution**: Run Python scripts directly in your browser using Pyodide, with support for popular libraries like pandas and matplotlib no setup required.
10
+
-**Python Code Execution**: Run Python scripts directly in your browser using Pyodide, with support for popular libraries like pandas and matplotlib with no setup required.
11
11
12
12
-**MermaidJS Rendering**: Create and visualize flowcharts, diagrams, and other visual representations with MermaidJS syntax that automatically renders in your chat.
13
13
14
14
-**Interactive Artifacts**: Generate and interact with rich content like HTML websites, SVG graphics, and JavaScript visualizations directly within your conversations.
15
15
16
-
These execution capabilities bridge the gap between conversation and implementation, allowing you to explore ideas, analyze data, and create visual content seamlessly while chatting with AI models.
16
+
These execution capabilities bridge the gap between conversation and implementation, allowing you to explore ideas, analyze data, and create visual content seamlessly while chatting with AI models.
Action functions allow you to write custom buttons to the message toolbar for end users to interact
7
-
with. This feature enables more interactive messaging, enabling users to grant permission before a
8
-
task is performed, generate visualizations of structured data, download an audio snippet of chats,
9
-
and many other use cases.
6
+
Action functions allow you to write custom buttons that appear in the message toolbar for end users to interact with. This feature enables more interactive messaging, allowing users to grant permission before a task is performed, generate visualizations of structured data, download an audio snippet of chats, and many other use cases.
10
7
11
-
A scaffold of Action code can be found [in the community section](https://openwebui.com/f/hub/custom_action/).
8
+
Actions are admin-managed functions that extend the chat interface with custom interactive capabilities. When a message is generated by a model that has actions configured, these actions appear as clickable buttons beneath the message.
9
+
10
+
A scaffold of Action code can be found [in the community section](https://openwebui.com/f/hub/custom_action/). For more Action Function examples built by the community, visit [https://openwebui.com/functions](https://openwebui.com/functions).
12
11
13
12
An example of a graph visualization Action can be seen in the video below.
14
13
@@ -21,46 +20,195 @@ An example of a graph visualization Action can be seen in the video below.
21
20
</a>
22
21
</p>
23
22
24
-
###Action
23
+
## Action Function Architecture
25
24
26
-
Actions are used to create a button in the Message UI (the small buttons found directly underneath individual chat messages).
25
+
Actions are Python-based functions that integrate directly into the chat message toolbar. They execute server-side and can interact with users through real-time events, modify message content, and access the full Open WebUI context.
27
26
28
-
Actions have a single main component called an action function. This component takes an object defining the type of action and the data being processed.
27
+
### Function Structure
29
28
30
-
<details>
31
-
<summary>Example</summary>
29
+
Actions follow a specific class structure with an `action` method as the main entry point:
Each Action function can include a docstring at the top to define metadata for the button. This helps customize the display and behavior of your Action in Open WebUI.
61
210
62
211
Example of supported frontmatter fields:
63
-
64
212
-`title`: Display name of the Action.
65
213
-`author`: Name of the creator.
66
214
-`version`: Version number of the Action.
@@ -69,13 +217,100 @@ Example of supported frontmatter fields:
- Provide progress updates for long-running operations
300
+
- Consider using background tasks for heavy processing
301
+
302
+
### User Experience
303
+
- Always provide clear feedback through event emitters
304
+
- Use confirmation dialogs for destructive actions
305
+
- Include helpful error messages
306
+
307
+
## Integration with Open WebUI Features
308
+
309
+
Actions integrate seamlessly with other Open WebUI features:
310
+
-**Models** - Actions can be model-specific or global
311
+
-**Tools** - Actions can invoke external tools and APIs
312
+
-**Files** - Actions can process uploaded files and generate new ones
313
+
-**Memory** - Actions can access conversation history and context
314
+
-**Permissions** - Actions respect user roles and access controls
315
+
316
+
For more examples and community-contributed actions, visit [https://openwebui.com/functions](https://openwebui.com/functions) where you can discover, download, and explore custom functions built by the Open WebUI community.
Copy file name to clipboardExpand all lines: docs/getting-started/advanced-topics/development.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ Before you begin, ensure your system meets these minimum requirements:
14
14
-**Operating System:** Linux (or WSL on Windows), Windows 11, or macOS. *(Recommended for best compatibility)*
15
15
-**Python:** Version **3.11 or higher**. *(Required for backend services)*
16
16
-**Node.js:** Version **22.10 or higher**. *(Required for frontend development)*
17
-
-**IDE (Recommended):** We recommend using an IDE like [VSCode](https://code.visualstudio.com/) for code editing, debugging, and integrated terminal access. Feel free to use your favorite IDE if you have one!
17
+
-**IDE (Recommended):** We recommend using an IDE like [VS Code](https://code.visualstudio.com/) for code editing, debugging, and integrated terminal access. Feel free to use your favorite IDE if you have one!
18
18
-**[Optional] GitHub Desktop:** For easier management of the Git repository, especially if you are less familiar with command-line Git, consider installing [GitHub Desktop](https://desktop.github.com/).
19
19
20
20
## Setting Up Your Local Environment
@@ -49,7 +49,7 @@ Let's get the user interface (what you see in your browser) up and running first
49
49
50
50
This command copies the `.env.example` file to a new file named `.env`. The `.env` file is where you'll configure environment variables for the frontend.
51
51
52
-
- **Customize `.env`**: Open the `.env` file in your code editor (like VSCode). This file contains configuration variables for the frontend, such as API endpoints and other settings. For local development, the default settings in `.env.example` are usually sufficient to start with. However, you can customize them if needed.
52
+
- **Customize `.env`**: Open the `.env` file in your code editor (like VS Code). This file contains configuration variables for the frontend, such as API endpoints and other settings. For local development, the default settings in `.env.example` are usually sufficient to start with. However, you can customize them if needed.
53
53
54
54
**Important:** Do not commit sensitive information to `.env` if you are contributing back to the repository.
55
55
@@ -107,17 +107,17 @@ npm run build
107
107
108
108
We **require** you to use separate terminal instances for your frontend and backend processes. This keeps your workflows organized and makes it easier to manage each part of the application independently.
109
109
110
-
**Using VSCode Integrated Terminals:**
110
+
**Using VS Code Integrated Terminals:**
111
111
112
-
VSCode's integrated terminal feature makes managing multiple terminals incredibly easy. Here's how to leverage it for frontend and backend separation:
112
+
VS Code's integrated terminal feature makes managing multiple terminals incredibly easy. Here's how to leverage it for frontend and backend separation:
113
113
114
-
1. **Frontend Terminal (You likely already have this):** If you followed the Frontend Setup steps, you probably already have a terminal open inVSCode at the project root (`open-webui` directory). This is where you'll run your frontend commands (`npm run dev`, etc.). Ensure you are in the `open-webui` directory for the next steps if you are not already.
114
+
1. **Frontend Terminal (You likely already have this):** If you followed the Frontend Setup steps, you probably already have a terminal open inVS Code at the project root (`open-webui` directory). This is where you'll run your frontend commands (`npm run dev`, etc.). Ensure you are in the `open-webui` directory for the next steps if you are not already.
115
115
116
116
2. **Backend Terminal (Open a New One):**
117
-
- In VSCode, go to **Terminal > New Terminal** (or use the shortcut `Ctrl+Shift+` on Windows/Linux or `Cmd+Shift+` on macOS). This will open a new integrated terminal panel.
117
+
- In VS Code, go to **Terminal > New Terminal** (or use the shortcut `Ctrl+Shift+` on Windows/Linux or `Cmd+Shift+` on macOS). This will open a new integrated terminal panel.
118
118
- **Navigate to the `backend` directory:** In this *new* terminal, use the `cd backend` command to change the directory to the `backend` folder within your project. This ensures all backend-related commands are executed in the correct context.
119
119
120
-
Now you have **two separate terminal instances within VSCode**: one for the frontend (likely in the `open-webui` directory) and one specifically for the backend (inside the `backend` directory). You can easily switch between these terminals within VSCode to manage your frontend and backend processes independently. This setup is highly recommended for a cleaner and more efficient development workflow.
120
+
Now you have **two separate terminal instances within VS Code**: one for the frontend (likely in the `open-webui` directory) and one specifically for the backend (inside the `backend` directory). You can easily switch between these terminals within VS Code to manage your frontend and backend processes independently. This setup is highly recommended for a cleaner and more efficient development workflow.
121
121
122
122
**Backend Setup Steps (in your *backend* terminal):**
0 commit comments