Further clean up

Further clean up
This commit is contained in:
Silentoplayz
2024-12-17 22:24:12 -05:00
parent ad016d2963
commit 12cf416d1b
30 changed files with 51 additions and 45 deletions

View File

@@ -1,5 +1,5 @@
---
sidebar_position: 11
sidebar_position: 13
title: "🔰 Customizable Banners"
---

View File

@@ -1,5 +1,5 @@
---
sidebar_position: 3
sidebar_position: 4
title: "⚙️ Chat Parameters"
---

View File

@@ -1,168 +0,0 @@
---
sidebar_position: 6
title: "🎨 Image Generation"
---
# Image Generation
Open WebUI supports image generation through three backends: **AUTOMATIC1111**, **ComfyUI**, and **OpenAI DALL·E**. This guide will help you set up and use either of these options.
## AUTOMATIC1111
Open WebUI supports image generation through the **AUTOMATIC1111** [API](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/API). Here are the steps to get started:
### Initial Setup
1. Ensure that you have [AUTOMATIC1111](https://github.com/AUTOMATIC1111/stable-diffusion-webui) installed.
2. Launch AUTOMATIC1111 with additional flags to enable API access:
```
./webui.sh --api --listen
```
3. For Docker installation of WebUI with the environment variables preset, use the following command:
```
docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -e AUTOMATIC1111_BASE_URL=http://host.docker.internal:7860/ -e ENABLE_IMAGE_GENERATION=True -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main
```
### Setting Up Open WebUI with AUTOMATIC1111
1. In Open WebUI, navigate to the **Admin Panel** > **Settings** > **Images** menu.
2. Set the `Image Generation Engine` field to `Default (Automatic1111)`.
3. In the API URL field, enter the address where AUTOMATIC1111's API is accessible:
```
http://<your_automatic1111_address>:7860/
```
If you're running a Docker installation of Open WebUI and AUTOMATIC1111 on the same host, use `http://host.docker.internal:7860/` as your address.
## ComfyUI
ComfyUI provides an alternative interface for managing and interacting with image generation models. Learn more or download it from its [GitHub page](https://github.com/comfyanonymous/ComfyUI). Below are the setup instructions to get ComfyUI running alongside your other tools.
### Initial Setup
1. Download and extract the ComfyUI software package from [GitHub](https://github.com/comfyanonymous/ComfyUI) to your desired directory.
2. To start ComfyUI, run the following command:
```
python main.py
```
For systems with low VRAM, launch ComfyUI with additional flags to reduce memory usage:
```
python main.py --lowvram
```
3. For Docker installation of WebUI with the environment variables preset, use the following command:
```
docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -e COMFYUI_BASE_URL=http://host.docker.internal:7860/ -e ENABLE_IMAGE_GENERATION=True -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main
```
### Setting Up Open WebUI with ComfyUI
#### Setting Up FLUX.1 Models
1. **Model Checkpoints**:
* Download either the `FLUX.1-schnell` or `FLUX.1-dev` model from the [black-forest-labs HuggingFace page](https://huggingface.co/black-forest-labs).
* Place the model checkpoint(s) in both the `models/checkpoints` and `models/unet` directories of ComfyUI. Alternatively, you can create a symbolic link between `models/checkpoints` and `models/unet` to ensure both directories contain the same model checkpoints.
2. **VAE Model**:
* Download `ae.safetensors` VAE from [here](https://huggingface.co/black-forest-labs/FLUX.1-schnell/blob/main/ae.safetensors).
* Place it in the `models/vae` ComfyUI directory.
3. **CLIP Model**:
* Download `clip_l.safetensors` from [here](https://huggingface.co/comfyanonymous/flux_text_encoders/tree/main).
* Place it in the `models/clip` ComfyUI directory.
4. **T5XXL Model**:
* Download either the `t5xxl_fp16.safetensors` or `t5xxl_fp8_e4m3fn.safetensors` model from [here](https://huggingface.co/comfyanonymous/flux_text_encoders/tree/main).
* Place it in the `models/clip` ComfyUI directory.
To integrate ComfyUI into Open WebUI, follow these steps:
#### Step 1: Configure Open WebUI Settings
1. Navigate to the **Admin Panel** in Open WebUI.
2. Click on **Settings** and then select the **Images** tab.
3. In the `Image Generation Engine` field, choose `ComfyUI`.
4. In the **API URL** field, enter the address where ComfyUI's API is accessible, following this format: `http://<your_comfyui_address>:8188/`.
* Set the environment variable `COMFYUI_BASE_URL` to this address to ensure it persists within the WebUI.
#### Step 2: Verify the Connection and Enable Image Generation
1. Ensure ComfyUI is running and that you've successfully verified the connection to Open WebUI. You won't be able to proceed without a successful connection.
2. Once the connection is verified, toggle on **Image Generation (Experimental)**. More options will be presented to you.
3. Continue to step 3 for the final configuration steps.
#### Step 3: Configure ComfyUI Settings and Import Workflow
1. Enable developer mode within ComfyUI. To do this, look for the gear icon above the **Queue Prompt** button within ComfyUI and enable the `Dev Mode` toggle.
2. Export the desired workflow from ComfyUI in `API format` using the `Save (API Format)` button. The file will be downloaded as `workflow_api.json` if done correctly.
3. Return to Open WebUI and click the **Click here to upload a workflow.json file** button.
4. Select the `workflow_api.json` file to import the exported workflow from ComfyUI into Open WebUI.
5. After importing the workflow, you must map the `ComfyUI Workflow Nodes` according to the imported workflow node IDs.
:::info
You may need to adjust an `Input Key` or two within Open WebUI's `ComfyUI Workflow Nodes` section to match a node within your workflow.
For example, `seed` may need to be renamed to `noise_seed` to match a node ID within your imported workflow.
:::
:::tip
Some workflows, such as ones that use any of the Flux models, may utilize multiple nodes IDs that is necessary to fill in for their node entry fields within Open WebUI. If a node entry field requires multiple IDs, the node IDs should be comma separated (e.g. `1` or `1, 2`).
:::
6. Click `Save` to apply the settings and enjoy image generation with ComfyUI integrated into Open WebUI!
After completing these steps, your ComfyUI setup should be integrated with Open WebUI, and you can use the Flux.1 models for image generation.
### Configuring with SwarmUI
SwarmUI utilizes ComfyUI as its backend. In order to get Open WebUI to work with SwarmUI you will have to append `ComfyBackendDirect` to the `ComfyUI Base URL`. Additionally, you will want to setup SwarmUI with LAN access. After aforementioned adjustments, setting up SwarmUI to work with Open WebUI will be the same as [Step one: Configure Open WebUI Settings](https://github.com/open-webui/docs/edit/main/docs/features/images.md#step-1-configure-open-webui-settings) as outlined above.
![Install SwarmUI with LAN Access](https://github.com/user-attachments/assets/a6567e13-1ced-4743-8d8e-be526207f9f6)
#### SwarmUI API URL
The address you will input as the ComfyUI Base URL will look like: `http://<your_swarmui_address>:7801/ComfyBackendDirect`
## OpenAI DALL·E
Open WebUI also supports image generation through the **OpenAI DALL·E APIs**. This option includes a selector for choosing between DALL·E 2 and DALL·E 3, each supporting different image sizes.
### Initial Setup
1. Obtain an [API key](https://platform.openai.com/api-keys) from OpenAI.
### Configuring Open WebUI
1. In Open WebUI, navigate to the **Admin Panel** > **Settings** > **Images** menu.
2. Set the `Image Generation Engine` field to `Open AI (Dall-E)`.
3. Enter your OpenAI API key.
4. Choose the DALL·E model you wish to use. Note that image size options will depend on the selected model:
* **DALL·E 2**: Supports `256x256`, `512x512`, or `1024x1024` images.
* **DALL·E 3**: Supports `1024x1024`, `1792x1024`, or `1024x1792` images.
### Azure OpenAI
Using Azure OpenAI Dall-E directly is unsupported, but you can [set up a LiteLLM proxy](https://litellm.vercel.app/docs/image_generation) which is compatible with the `Open AI (Dall-E)` Image Generation Engine.
## Using Image Generation
![Image Generation Tutorial](/img/tutorial_image_generation.png)
1. First, use a text generation model to write a prompt for image generation.
2. After the response has finished, you can click the Picture icon to generate an image.
3. After the image has finished generating, it will be returned automatically in chat.
:::tip
You can also edit the LLM's response and enter your image generation prompt as the message
to send off for image generation instead of using the actual response provided by the
LLM.
:::

View File

@@ -206,7 +206,7 @@ import { TopBanners } from "@site/src/components/TopBanners";
### 🎙️ Voice & Accessibility
- 🗣️ **Voice Input Support**: Engage with your model through voice interactions; enjoy the convenience of talking to your model directly. Additionally, explore the option for sending voice input automatically after 3 seconds of silence for a streamlined experience.
- Microphone access requires manually setting up a secure connection over HTTPS to work, or [manually whitelisting your URL at your own risk](https://docs.openwebui.com/troubleshooting/microphone-access-and-other-permission-issues-with-non-https-connections).
- Microphone access requires manually setting up a secure connection over HTTPS to work, or [manually whitelisting your URL at your own risk](https://docs.openwebui.com/troubleshooting/microphone-error).
- 😊 **Emoji Call**: Toggle this feature on from the `Settings` > `Interface` menu, allowing LLMs to express emotions using emojis during voice calls for a more dynamic interaction.
- Microphone access requires a secure connection over HTTPS for this feature to work.

View File

@@ -1,5 +1,5 @@
---
sidebar_position: 12
sidebar_position: 14
title: "📎 JWT Expiration"
---

4
docs/features/memory.md Normal file
View File

@@ -0,0 +1,4 @@
---
sidebar_position: 15
title: "🧠 Memory (Experimental)"
---

View File

@@ -0,0 +1,4 @@
---
sidebar_position: 4
title: "🔐 OAuth"
---

View File

@@ -1,5 +1,5 @@
---
sidebar_position: 3
sidebar_position: 6
title: "⚖️ Ollama Load Balancing"
---

View File

@@ -1,6 +1,6 @@
---
sidebar_position: 3
title: "OpenAI Connections"
sidebar_position: 9
title: "🖇 OpenAI Connections"
---
In this tutorial, we will demonstrate how to configure multiple OpenAI (or compatible) API endpoints using environment variables. This setup allows you to easily switch between different API providers or use multiple providers simultaneously, while keeping your configuration between container updates, rebuilds or redeployments.

View File

@@ -1,5 +1,5 @@
---
sidebar_position: 1
sidebar_position: 2
title: "🛝 Playground (Beta)"
---

View File

@@ -1,6 +1,6 @@
---
sidebar_position: 6
title: "Actions"
title: "🎬 Actions"
---
Action functions allow you to write custom buttons to the message toolbar for end users to interact

View File

@@ -1,6 +1,6 @@
---
sidebar_position: 1
title: "Functions"
title: "🧰 Functions"
---
## What are Functions?

View File

@@ -1,5 +1,5 @@
---
sidebar_position: 2
sidebar_position: 1
title: "🛠️ Tools & Functions"
---

View File

@@ -1,6 +1,6 @@
---
sidebar_position: 0
title: "Tools"
title: "⚙️ Tools"
---
## What are Tools?

View File

@@ -1,6 +1,6 @@
---
sidebar_position: 4
title: "Retrieval Augmented Generation (RAG)"
sidebar_position: 8
title: "🔎 Retrieval Augmented Generation (RAG)"
---
Retrieval Augmented Generation (RAG) is a a cutting-edge technology that enhances the conversational capabilities of chatbots by incorporating context from diverse sources. It works by retrieving relevant information from a wide range of sources such as local and remote documents, web content, and even multimedia sources like YouTube videos. The retrieved text is then combined with a predefined RAG template and prefixed to the user's prompt, providing a more informed and contextually relevant response.

View File

@@ -1,6 +1,6 @@
---
sidebar_position: 9
title: "SSO: Federated Authentication Support"
sidebar_position: 11
title: "🔒 SSO: Federated Authentication Support"
---
# Federated Authentication Support

4
docs/features/tasks.md Normal file
View File

@@ -0,0 +1,4 @@
---
sidebar_position: 4
title: "📝 Task Model"
---

View File

@@ -1,5 +1,5 @@
---
sidebar_position: 3
sidebar_position: 5
title: "🔗 URL Parameters"
---

View File

@@ -1,377 +0,0 @@
---
sidebar_position: 5
title: "🌐 Web Search"
---
## Overview
This guide provides instructions on how to set up web search capabilities in Open WebUI using various search engines.
## SearXNG (Docker)
> "**SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.**"
### 1. SearXNG Configuration
If you want to modify the default configuration, follow these steps:
1. Create a new directory `searxng-docker` by cloning the searxng-docker repository. This folder will contain your SearXNG configuration files. Refer to the [SearXNG documentation](https://docs.searxng.org/) for configuration instructions.
```bash
git clone https://github.com/searxng/searxng-docker.git
```
1. Navigate to the `searxng-docker` repository:
```bash
cd searxng-docker
```
3. Remove the `localhost` restriction and define a less used port by modifying the `docker-compose.yaml` file:
```bash
sed -i "s/127.0.0.1:8080/1337/" docker-compose.yaml
```
4. Allow the container to create new config files:
```bash
sudo chmod a+rwx searxng-docker/
```
5. Create a non-restrictive `searxng-docker/limiter.toml` config file:
<details>
<summary>searxng-docker/limiter.toml</summary>
```bash
cat > searxng-docker/limiter.toml << EOF
[botdetection.ip_limit]
# activate link_token method in the ip_limit method
link_token = false
[botdetection.ip_lists]
block_ip = []
pass_ip = []
EOF
```
</details>
6. Delete the default `searxng-docker/settings.yml` file, it will be regenerated on first launch:
```bash
rm searxng-docker/settings.yml
```
7. Bring up the container momentarily to generate a fresh settings.yml file:
```bash
docker compose up searxng-docker -d ; sleep 10 ; docker compose down searxng-docker
```
8. Add HTML and JSON formats to the `searxng-docker/settings.yml` file:
```bash
sed -i 's/formats: \[\"html\"\/]/formats: [\"html\", \"json\"]/' searxng-docker/settings.yml
```
#### Configuration Files
#### searxng/settings.yml (Extract)
The default `settings.yml` file contains many engine settings. Below is an extract of what the default `settings.yml` file might look like:
<details>
<summary>searxng-docker/settings.yml</summary>
```yaml
# see https://docs.searxng.org/admin/settings/settings.html#settings-use-default-settings
use_default_settings: true
server:
secret_key: "Generate a secret key and provide it here"
limiter: false
image_proxy: true
port: 8080
bind_address: "0.0.0.0"
ui:
static_use_hash: true
search:
safe_search: 0
autocomplete: ""
default_lang: ""
formats:
- html
- json
# json is required
```
</details>
8. Your `searxng-docker/uwsgi.ini` file for SearXNG should look like:
<details>
<summary>searxng-docker/uwsgi.ini</summary>
```ini
[uwsgi]
# Who will run the code
uid = searxng
gid = searxng
# Number of workers (usually CPU count)
# default value: %k (= number of CPU core, see Dockerfile)
workers = %k
# Number of threads per worker
# default value: 4 (see Dockerfile)
threads = 4
# The right granted on the created socket
chmod-socket = 666
# Plugin to use and interpreter config
single-interpreter = true
master = true
plugin = python3
lazy-apps = true
enable-threads = 4
# Module to import
module = searx.webapp
# Virtualenv and python path
pythonpath = /usr/local/searxng/
chdir = /usr/local/searxng/searx/
# automatically set processes name to something meaningful
auto-procname = true
# Disable request logging for privacy
disable-logging = true
log-5xx = true
# Set the max size of a request (request-body excluded)
buffer-size = 8192
# No keep alive
# See https://github.com/searx/searx-docker/issues/24
add-header = Connection: close
# uwsgi serves the static files
static-map = /static=/usr/local/searxng/searx/static
# expires set to one day
static-expires = /* 86400
static-gzip-all = True
offload-threads = 4
```
</details>
Now, copy the modified `searxng-docker` folder to the same directory as your compose files.
Alternatively, if you don't want to modify the default configuration, you can simply create an empty `searxng-docker` folder and follow the rest of the setup instructions.
### 2. Docker Compose Setup
Add the following to your `docker-compose.yaml` file:
```yaml
services:
open-webui:
environment:
ENABLE_RAG_WEB_SEARCH: True
RAG_WEB_SEARCH_ENGINE: "searxng"
RAG_WEB_SEARCH_RESULT_COUNT: 3
RAG_WEB_SEARCH_CONCURRENT_REQUESTS: 10
SEARXNG_QUERY_URL: "http://searxng:1337/search?q=<query>"
searxng:
image: searxng/searxng:latest
container_name: searxng
ports:
- "1337:8080"
volumes:
- ./searxng:/etc/searxng
restart: unless-stopped
```
Launch your updated stack with:
```bash
docker compose up -d
```
Alternatively, you can run SearXNG directly using `docker run`:
```bash
docker run -d --name searxng -p 1337:8080 -v ./searxng:/etc/searxng --restart always searxng/searxng:latest
```
Confirm connectivity from Open-WebUI container instance:
```bash
docker exec -it open-webui curl 'http://host.docker.internal:1337/search?q=this+is+a+test+query&format=json'
```
### 3. GUI Configuration
1. Navigate to: `Admin Panel` -> `Settings` -> `Web Search`
2. Toggle `Enable Web Search`
3. Set `Web Search Engine` from dropdown menu to `searxng`
4. Set `Searxng Query URL` to examples given: `https://<search.domain.com>/search?q=<query>` or `http://<searxng.local>/search?q=<query>`. **Do note the `/search?q=<query>` part is mandatory.**
5. Adjust the `Search Result Count` and `Concurrent Requests` values accordingly
6. Save changes
![SearXNG GUI Configuration](/img/tutorial_searxng_config.png)
### 4. Using Web Search in a Chat
To access Web Search, Click on the + next to the message input field.
Here you can toggle Web Search On/Off.
![Web Search UI Toggle](/img/web_search_toggle.png)
#### Note
You will have to explicitly toggle this On/Off in a chat.
This is enabled on a per session basis eg. reloading the page, changing to another chat will toggle off.
## Google PSE API
### Setup
1. Go to Google Developers, use [Programmable Search Engine](https://developers.google.com/custom-search), and log on or create account.
2. Go to [control panel](https://programmablesearchengine.google.com/controlpanel/all) and click `Add` button
3. Enter a search engine name, set the other properties to suit your needs, verify you're not a robot and click `Create` button.
4. Generate `API key` and get the `Search engine ID`. (Available after the engine is created)
5. With `API key` and `Search engine ID`, open `Open WebUI Admin panel` and click `Settings` tab, and then click `Web Search`
6. Enable `Web search` and Set `Web Search Engine` to `google_pse`
7. Fill `Google PSE API Key` with the `API key` and `Google PSE Engine Id` (# 4)
8. Click `Save`
![Open WebUI Admin panel](/img/tutorial_google_pse1.png)
#### Note
You have to enable `Web search` in the prompt field, using plus (`+`) button.
Search the web ;-)
![enable Web search](/img/tutorial_google_pse2.png)
## Brave API
### Docker Compose Setup
Add the following to a file named `docker-compose.yaml`:
```yaml
services:
open-webui:
environment:
ENABLE_RAG_WEB_SEARCH: True
RAG_WEB_SEARCH_ENGINE: "brave"
BRAVE_SEARCH_API_KEY: "YOUR_API_KEY"
RAG_WEB_SEARCH_RESULT_COUNT: 3
RAG_WEB_SEARCH_CONCURRENT_REQUESTS: 10
```
## Mojeek Search API
### Setup
1. Please visit [Mojeek Search API page](https://www.mojeek.com/services/search/web-search-api/) to obtain an `API key`
2. With `API key`, open `Open WebUI Admin panel` and click `Settings` tab, and then click `Web Search`
3. Enable `Web search` and Set `Web Search Engine` to `mojeek`
4. Fill `Mojeek Search API Key` with the `API key`
5. Click `Save`
### Docker Compose Setup
Add the following to a file named `docker-compose.yaml`:
```yaml
services:
open-webui:
environment:
ENABLE_RAG_WEB_SEARCH: True
RAG_WEB_SEARCH_ENGINE: "mojeek"
BRAVE_SEARCH_API_KEY: "YOUR_MOJEEK_API_KEY"
RAG_WEB_SEARCH_RESULT_COUNT: 3
RAG_WEB_SEARCH_CONCURRENT_REQUESTS: 10
```
## SearchApi API
[SearchApi](https://searchapi.io) is a collection of real-time SERP APIs. Any existing or upcoming SERP engine that returns `organic_results` is supported. The default web search engine is `google`, but it can be changed to `bing`, `baidu`, `google_news`, `bing_news`, `google_scholar`, `google_patents`, and others.
### Setup
1. Go to [SearchApi](https://searchapi.io), and log on or create a new account.
2. Go to `Dashboard` and copy the API key.
3. With `API key`, open `Open WebUI Admin panel` and click `Settings` tab, and then click `Web Search`.
4. Enable `Web search` and set `Web Search Engine` to `searchapi`.
5. Fill `SearchApi API Key` with the `API key` that you copied in step 2 from [SearchApi](https://www.searchapi.io/) dashboard.
6. [Optional] Enter the `SearchApi engine` name you want to query. Example, `google`, `bing`, `baidu`, `google_news`, `bing_news`, `google_videos`, `google_scholar` and `google_patents.` By default, it is set to `google`.
7. Click `Save`.
![Open WebUI Admin panel](/img/tutorial_searchapi_search.png)
#### Note
You have to enable `Web search` in the prompt field, using plus (`+`) button to search the web using [SearchApi](https://www.searchapi.io/) engines.
![enable Web search](/img/enable_web_search.png)
## Kagi API
Coming Soon
### Setup
## Serpstack API
Coming Soon
### Setup
## Serper API
Coming Soon
### Setup
## Serply API
Coming Soon
### Setup
## DuckDuckGo API
### Setup
No setup required! DuckDuckGo works out of the box in Open WebUI. Note that there is a possibility of your searches being rate limited.
## Tavily API
Coming Soon
### Setup
## Jina API
Coming Soon
### Setup
## Bing API
Coming Soon
### Setup

View File

@@ -1,5 +1,5 @@
---
sidebar_position: 10
sidebar_position: 12
title: "🪝 Webhook for New Sign Ups"
---

View File

@@ -1,6 +1,6 @@
---
sidebar_position: 8
title: "Model Whitelisting"
sidebar_position: 10
title: "📝 Model Whitelisting"
---
Open WebUI allows you to filter specific models for use in your instance. This feature is especially useful for administrators who want to control which models are available to users. Filtering can be done through the WebUI or by adding environment variables to the backend.

View File

@@ -1,4 +0,0 @@
---
sidebar_position: 3
title: "🛠️ Tools"
---