Skip to content
Merged

Dev #1026

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions docs/features/plugin/development/valves.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,30 @@ class Filter:
```

</details>

## Input Types

Valves support special input types that change how fields are rendered in the UI. You can configure these using `json_schema_extra` with the `input` key in your Pydantic `Field` definitions.

### Password Input (Masked Fields)

For sensitive fields like passwords, API keys, or secrets, you can use the password input type to mask the value in the UI. This prevents the password from being visible on screen (protecting against shoulder surfing).

```python
from pydantic import BaseModel, Field

class Tools:
class UserValves(BaseModel):
service_password: str = Field(
default="",
description="Your service password",
json_schema_extra={"input": {"type": "password"}}
)
```

When rendered, this field will appear as a masked input (dots instead of characters) with a toggle to reveal the value if needed, using Open WebUI's `SensitiveInput` component.

:::tip
Use password input types for any credential or secret that users configure in their Valves or UserValves. This is especially important for UserValves since they are configurable by end users directly from the chat interface.
:::

10 changes: 10 additions & 0 deletions docs/getting-started/env-configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2753,6 +2753,16 @@ The `markdown_header` option has been removed from `RAG_TEXT_SPLITTER`. Markdown
- Description: Extracts images from PDFs using OCR when loading documents.
- Persistence: This environment variable is a `PersistentConfig` variable.

#### `PDF_LOADER_MODE`

- Type: `str`
- Options:
- `page` - Creates one document per page (default).
- `single` - Combines all pages into one document for better chunking across page boundaries.
- Default: `page`
- Description: Controls how PDFs are loaded and split into documents when using the **default content extraction engine** (PyPDFLoader). Page mode creates one document per page, while single mode combines all pages into one document, which can improve chunking quality when content spans across page boundaries. This setting has no effect when using external content extraction engines like Tika, Docling, Document Intelligence, MinerU, or Mistral OCR, as those engines have their own document handling logic.
- Persistence: This environment variable is a `PersistentConfig` variable.

#### `RAG_FILE_MAX_SIZE`

- Type: `int`
Expand Down