2026-03-09 21:42:17 +08:00
|
|
|
|
# 🔄 Deployment Scripts Update Mechanism
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
## Core Answer
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
✅ **Yes, re-deploying automatically updates the plugin!**
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
The deployment script uses a **smart two-stage strategy**:
|
2026-03-11 23:32:00 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
1. 🔄 **Try UPDATE First** (if plugin exists)
|
|
|
|
|
|
2. 📝 **Auto CREATE** (if update fails — plugin doesn't exist)
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
## Workflow Diagram
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
|
|
|
|
|
```
|
2026-03-09 21:42:17 +08:00
|
|
|
|
Run deploy script
|
2026-03-09 20:31:25 +08:00
|
|
|
|
↓
|
2026-03-09 21:42:17 +08:00
|
|
|
|
Read local code and metadata
|
2026-03-09 20:31:25 +08:00
|
|
|
|
↓
|
2026-03-09 21:42:17 +08:00
|
|
|
|
Send UPDATE request to OpenWebUI
|
2026-03-09 20:31:25 +08:00
|
|
|
|
↓
|
|
|
|
|
|
├─ HTTP 200 ✅
|
2026-03-09 21:42:17 +08:00
|
|
|
|
│ └─ Plugin exists → Update successful!
|
2026-03-09 20:31:25 +08:00
|
|
|
|
│
|
2026-03-09 21:42:17 +08:00
|
|
|
|
└─ Other status codes (404, 400, etc.)
|
|
|
|
|
|
└─ Plugin doesn't exist or update failed
|
2026-03-09 20:31:25 +08:00
|
|
|
|
↓
|
2026-03-09 21:42:17 +08:00
|
|
|
|
Send CREATE request
|
2026-03-09 20:31:25 +08:00
|
|
|
|
↓
|
|
|
|
|
|
├─ HTTP 200 ✅
|
2026-03-09 21:42:17 +08:00
|
|
|
|
│ └─ Creation successful!
|
2026-03-09 20:31:25 +08:00
|
|
|
|
│
|
2026-03-09 21:42:17 +08:00
|
|
|
|
└─ Failed
|
|
|
|
|
|
└─ Display error message
|
2026-03-09 20:31:25 +08:00
|
|
|
|
```
|
|
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
## Detailed Step-by-step
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
### Step 1️⃣: Try UPDATE First
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
|
|
|
|
|
```python
|
2026-03-09 21:42:17 +08:00
|
|
|
|
# Code location: deploy_filter.py line 220-230
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
update_url = "http://localhost:3000/api/v1/functions/id/{filter_id}/update"
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
|
|
|
|
|
response = requests.post(
|
|
|
|
|
|
update_url,
|
|
|
|
|
|
headers=headers,
|
|
|
|
|
|
data=json.dumps(payload),
|
|
|
|
|
|
timeout=10,
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
if response.status_code == 200:
|
|
|
|
|
|
print(f"✅ Successfully updated '{title}' filter!")
|
|
|
|
|
|
return True
|
|
|
|
|
|
```
|
|
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
**What Happens**:
|
2026-03-11 23:32:00 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
- Send **POST** to `/api/v1/functions/id/{filter_id}/update`
|
|
|
|
|
|
- If returns **HTTP 200**, plugin exists and update succeeded
|
|
|
|
|
|
- Includes:
|
|
|
|
|
|
- Complete latest code
|
|
|
|
|
|
- Metadata (title, version, author, description, etc.)
|
|
|
|
|
|
- Manifest information
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
### Step 2️⃣: If UPDATE Fails, Try CREATE
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
|
|
|
|
|
```python
|
2026-03-09 21:42:17 +08:00
|
|
|
|
# Code location: deploy_filter.py line 231-245
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
|
|
|
|
|
if response.status_code != 200:
|
|
|
|
|
|
print(f"⚠️ Update failed with status {response.status_code}, "
|
|
|
|
|
|
"attempting to create instead...")
|
|
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
create_url = "http://localhost:3000/api/v1/functions/create"
|
2026-03-09 20:31:25 +08:00
|
|
|
|
res_create = requests.post(
|
|
|
|
|
|
create_url,
|
|
|
|
|
|
headers=headers,
|
|
|
|
|
|
data=json.dumps(payload),
|
|
|
|
|
|
timeout=10,
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
if res_create.status_code == 200:
|
|
|
|
|
|
print(f"✅ Successfully created '{title}' filter!")
|
|
|
|
|
|
return True
|
|
|
|
|
|
```
|
|
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
**What Happens**:
|
2026-03-11 23:32:00 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
- If update fails (HTTP ≠ 200), auto-attempt create
|
|
|
|
|
|
- Send **POST** to `/api/v1/functions/create`
|
|
|
|
|
|
- Uses **same payload** (code, metadata identical)
|
|
|
|
|
|
- If creation succeeds, first deployment to OpenWebUI
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
## Real-world Scenarios
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
### Scenario A: First Deployment
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
|
$ python deploy_async_context_compression.py
|
|
|
|
|
|
|
|
|
|
|
|
📦 Deploying filter 'Async Context Compression' (version 1.3.0)...
|
|
|
|
|
|
File: .../async_context_compression.py
|
2026-03-09 21:42:17 +08:00
|
|
|
|
⚠️ Update failed with status 404, attempting to create instead... ← First time, plugin doesn't exist
|
|
|
|
|
|
✅ Successfully created 'Async Context Compression' filter! ← Creation succeeds
|
2026-03-09 20:31:25 +08:00
|
|
|
|
```
|
|
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
**What Happens**:
|
2026-03-11 23:32:00 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
1. Try UPDATE → fails (HTTP 404 — plugin doesn't exist)
|
|
|
|
|
|
2. Auto-try CREATE → succeeds (HTTP 200)
|
|
|
|
|
|
3. Plugin created in OpenWebUI
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
### Scenario B: Re-deploy After Code Changes
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
|
|
|
|
|
```bash
|
2026-03-09 21:42:17 +08:00
|
|
|
|
# Made first code change, deploying again
|
2026-03-09 20:31:25 +08:00
|
|
|
|
$ python deploy_async_context_compression.py
|
|
|
|
|
|
|
|
|
|
|
|
📦 Deploying filter 'Async Context Compression' (version 1.3.1)...
|
|
|
|
|
|
File: .../async_context_compression.py
|
2026-03-09 21:42:17 +08:00
|
|
|
|
✅ Successfully updated 'Async Context Compression' filter! ← Direct update!
|
2026-03-09 20:31:25 +08:00
|
|
|
|
```
|
|
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
**What Happens**:
|
2026-03-11 23:32:00 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
1. Read modified code
|
|
|
|
|
|
2. Try UPDATE → succeeds (HTTP 200 — plugin exists)
|
|
|
|
|
|
3. Plugin in OpenWebUI updated to latest code
|
|
|
|
|
|
4. **No need to restart OpenWebUI**, takes effect immediately!
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
### Scenario C: Multiple Fast Iterations
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
|
|
|
|
|
```bash
|
2026-03-09 21:42:17 +08:00
|
|
|
|
# 1st change
|
2026-03-09 20:31:25 +08:00
|
|
|
|
$ python deploy_async_context_compression.py
|
|
|
|
|
|
✅ Successfully updated 'Async Context Compression' filter!
|
|
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
# 2nd change
|
2026-03-09 20:31:25 +08:00
|
|
|
|
$ python deploy_async_context_compression.py
|
|
|
|
|
|
✅ Successfully updated 'Async Context Compression' filter!
|
|
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
# 3rd change
|
2026-03-09 20:31:25 +08:00
|
|
|
|
$ python deploy_async_context_compression.py
|
|
|
|
|
|
✅ Successfully updated 'Async Context Compression' filter!
|
|
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
# ... repeat infinitely ...
|
2026-03-09 20:31:25 +08:00
|
|
|
|
```
|
|
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
**Characteristics**:
|
2026-03-11 23:32:00 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
- 🚀 Each update takes only 5 seconds
|
|
|
|
|
|
- 📝 Each is an incremental update
|
|
|
|
|
|
- ✅ No need to restart OpenWebUI
|
|
|
|
|
|
- 🔄 Can repeat indefinitely
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
## What Gets Updated
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
Each deployment updates the following:
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
✅ **Code** — All latest Python code
|
|
|
|
|
|
✅ **Version** — Auto-extracted from docstring
|
|
|
|
|
|
✅ **Title** — Plugin display name
|
|
|
|
|
|
✅ **Author Info** — author, author_url
|
|
|
|
|
|
✅ **Description** — Plugin description
|
|
|
|
|
|
✅ **Metadata** — funding_url, openwebui_id, etc.
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
❌ **Configuration NOT Overwritten** — User's Valves settings in OpenWebUI stay unchanged
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
## Version Number Management
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
### Does Version Change on Update?
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
✅ **Yes!**
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
|
|
|
|
|
```python
|
2026-03-09 21:42:17 +08:00
|
|
|
|
# docstring in async_context_compression.py
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
title: Async Context Compression
|
|
|
|
|
|
version: 1.3.0
|
|
|
|
|
|
"""
|
|
|
|
|
|
```
|
|
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
**Each deployment**:
|
2026-03-11 23:32:00 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
1. Script reads version from docstring
|
|
|
|
|
|
2. Sends this version in manifest to OpenWebUI
|
|
|
|
|
|
3. If you change version in code, deployment updates to new version
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
**Best Practice**:
|
2026-03-11 23:32:00 +08:00
|
|
|
|
|
2026-03-09 20:31:25 +08:00
|
|
|
|
```bash
|
2026-03-09 21:42:17 +08:00
|
|
|
|
# 1. Modify code
|
2026-03-09 20:31:25 +08:00
|
|
|
|
vim async_context_compression.py
|
|
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
# 2. Update version (in docstring)
|
|
|
|
|
|
# version: 1.3.0 → 1.3.1
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
# 3. Deploy
|
2026-03-09 20:31:25 +08:00
|
|
|
|
python deploy_async_context_compression.py
|
|
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
# Result: OpenWebUI shows version 1.3.1
|
2026-03-09 20:31:25 +08:00
|
|
|
|
```
|
|
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
## Deployment Failure Cases
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
### Case 1: Network Error
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
|
|
|
|
|
```bash
|
2026-03-09 21:42:17 +08:00
|
|
|
|
❌ Connection error: Could not reach OpenWebUI at localhost:3000
|
2026-03-09 20:31:25 +08:00
|
|
|
|
Make sure OpenWebUI is running and accessible.
|
|
|
|
|
|
```
|
|
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
**Cause**: OpenWebUI not running or wrong port
|
|
|
|
|
|
**Solution**: Check if OpenWebUI is running
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
### Case 2: Invalid API Key
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
|
❌ Failed to update or create. Status: 401
|
|
|
|
|
|
Error: {"error": "Unauthorized"}
|
|
|
|
|
|
```
|
|
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
**Cause**: API key in .env is invalid or expired
|
|
|
|
|
|
**Solution**: Update api_key in `.env` file
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
### Case 3: Server Error
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
|
❌ Failed to update or create. Status: 500
|
|
|
|
|
|
Error: Internal server error
|
|
|
|
|
|
```
|
|
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
**Cause**: OpenWebUI server internal error
|
|
|
|
|
|
**Solution**: Check OpenWebUI logs
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
## Setting Version Numbers — Best Practices
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
### Semantic Versioning
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
Follow `MAJOR.MINOR.PATCH` format:
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
|
|
|
|
|
```python
|
|
|
|
|
|
"""
|
|
|
|
|
|
version: 1.3.0
|
|
|
|
|
|
│ │ │
|
2026-03-09 21:42:17 +08:00
|
|
|
|
│ │ └─ PATCH: Bug fixes (1.3.0 → 1.3.1)
|
|
|
|
|
|
│ └────── MINOR: New features (1.3.0 → 1.4.0)
|
|
|
|
|
|
└───────── MAJOR: Breaking changes (1.3.0 → 2.0.0)
|
2026-03-09 20:31:25 +08:00
|
|
|
|
"""
|
|
|
|
|
|
```
|
|
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
**Examples**:
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
|
|
|
|
|
```python
|
2026-03-09 21:42:17 +08:00
|
|
|
|
# Bug fix (PATCH)
|
2026-03-09 20:31:25 +08:00
|
|
|
|
version: 1.3.0 → 1.3.1
|
|
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
# New feature (MINOR)
|
2026-03-09 20:31:25 +08:00
|
|
|
|
version: 1.3.0 → 1.4.0
|
|
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
# Major update (MAJOR)
|
2026-03-09 20:31:25 +08:00
|
|
|
|
version: 1.3.0 → 2.0.0
|
|
|
|
|
|
```
|
|
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
## Complete Iteration Workflow
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
|
|
|
|
|
```bash
|
2026-03-09 21:42:17 +08:00
|
|
|
|
# 1. First deployment
|
2026-03-09 20:31:25 +08:00
|
|
|
|
cd scripts
|
|
|
|
|
|
python deploy_async_context_compression.py
|
2026-03-09 21:42:17 +08:00
|
|
|
|
# Result: Plugin created (first time)
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
# 2. Modify code
|
2026-03-09 20:31:25 +08:00
|
|
|
|
vim ../plugins/filters/async-context-compression/async_context_compression.py
|
2026-03-09 21:42:17 +08:00
|
|
|
|
# Edit code...
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
# 3. Deploy again (auto-update)
|
2026-03-09 20:31:25 +08:00
|
|
|
|
python deploy_async_context_compression.py
|
2026-03-09 21:42:17 +08:00
|
|
|
|
# Result: Plugin updated (takes effect immediately, no OpenWebUI restart)
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
# 4. Repeat steps 2-3 indefinitely
|
|
|
|
|
|
# Modify → Deploy → Test → Improve → Repeat
|
2026-03-09 20:31:25 +08:00
|
|
|
|
```
|
|
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
## Benefits of Auto-update
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
| Benefit | Details |
|
|
|
|
|
|
|---------|---------|
|
|
|
|
|
|
| ⚡ **Fast Iteration** | Code change → Deploy (5s) → Test, no waiting |
|
|
|
|
|
|
| 🔄 **Auto-detection** | No manual decision between create/update |
|
|
|
|
|
|
| 📝 **Version Management** | Version auto-extracted from code |
|
|
|
|
|
|
| ✅ **No Restart Needed** | OpenWebUI runs continuously, config stays same |
|
|
|
|
|
|
| 🛡️ **Safe Updates** | User settings (Valves) never overwritten |
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
## Disable Auto-update? ❌
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
Usually **not needed** because:
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
2026-03-09 21:42:17 +08:00
|
|
|
|
1. ✅ Updates are idempotent (same code deployed multiple times = no change)
|
|
|
|
|
|
2. ✅ User configuration not modified
|
|
|
|
|
|
3. ✅ Version numbers auto-managed
|
|
|
|
|
|
4. ✅ Failures auto-rollback
|
2026-03-09 20:31:25 +08:00
|
|
|
|
|
|
|
|
|
|
但如果真的需要控制,可以:
|
2026-03-11 23:32:00 +08:00
|
|
|
|
|
2026-03-09 20:31:25 +08:00
|
|
|
|
- 手动修改脚本 (修改 `deploy_filter.py`)
|
|
|
|
|
|
- 或分别使用 UPDATE/CREATE 的具体 API 端点
|
|
|
|
|
|
|
|
|
|
|
|
## 常见问题
|
|
|
|
|
|
|
|
|
|
|
|
### Q: 更新是否会丢失用户的配置?
|
|
|
|
|
|
|
|
|
|
|
|
❌ **不会!**
|
|
|
|
|
|
用户在 OpenWebUI 中设置的 Valves (参数配置) 会被保留。
|
|
|
|
|
|
|
|
|
|
|
|
### Q: 是否可以回到旧版本?
|
|
|
|
|
|
|
|
|
|
|
|
✅ **可以!**
|
|
|
|
|
|
修改代码中的 `version` 号为旧版本,然后重新部署。
|
|
|
|
|
|
|
|
|
|
|
|
### Q: 更新需要多长时间?
|
|
|
|
|
|
|
|
|
|
|
|
⚡ **约 5 秒**
|
|
|
|
|
|
包括: 读文件 (1s) + 发送请求 (3s) + 响应 (1s)
|
|
|
|
|
|
|
|
|
|
|
|
### Q: 可以同时部署多个插件吗?
|
|
|
|
|
|
|
|
|
|
|
|
✅ **可以!**
|
2026-03-11 23:32:00 +08:00
|
|
|
|
|
2026-03-09 20:31:25 +08:00
|
|
|
|
```bash
|
|
|
|
|
|
python deploy_filter.py async-context-compression
|
|
|
|
|
|
python deploy_filter.py folder-memory
|
|
|
|
|
|
python deploy_filter.py context_enhancement_filter
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
### Q: 部署失败了会怎样?
|
|
|
|
|
|
|
|
|
|
|
|
✅ **OpenWebUI 中的插件保持不变**
|
|
|
|
|
|
失败不会修改已部署的插件。
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
|
|
**总结**: 部署脚本的更新机制完全自动化,开发者只需修改代码,每次运行 `deploy_async_context_compression.py` 就会自动:
|
2026-03-11 23:32:00 +08:00
|
|
|
|
|
2026-03-09 20:31:25 +08:00
|
|
|
|
1. ✅ 创建(第一次)或更新(后续)插件
|
|
|
|
|
|
2. ✅ 从代码提取最新的元数据和版本号
|
|
|
|
|
|
3. ✅ 立即生效,无需重启 OpenWebUI
|
|
|
|
|
|
4. ✅ 保留用户的配置不变
|
|
|
|
|
|
|
|
|
|
|
|
这使得本地开发和快速迭代变得极其流畅!🚀
|