chore: rename update_pipe.py to deploy_pipe.py to reflect its creation capabilities and update skills reference
This commit is contained in:
@@ -18,7 +18,7 @@ This is a **universal testing framework** for publishing the latest `github_copi
|
|||||||
|
|
||||||
| Attribute | Fixed Value |
|
| Attribute | Fixed Value |
|
||||||
|------|--------|
|
|------|--------|
|
||||||
| **Deployment Script** | `/Users/fujie/app/python/oui/openwebui-extensions/scripts/update_pipe.py` |
|
| **Deployment Script** | `/Users/fujie/app/python/oui/openwebui-extensions/scripts/deploy_pipe.py` |
|
||||||
| **Python Path** | `/opt/homebrew/Caskroom/miniconda/base/envs/ai/bin/python3` |
|
| **Python Path** | `/opt/homebrew/Caskroom/miniconda/base/envs/ai/bin/python3` |
|
||||||
| **Test URL** | `http://localhost:3003/?model=github_copilot_official_sdk_pipe.github_copilot_sdk-gpt-4.1` |
|
| **Test URL** | `http://localhost:3003/?model=github_copilot_official_sdk_pipe.github_copilot_sdk-gpt-4.1` |
|
||||||
|
|
||||||
@@ -36,11 +36,11 @@ Example: *Modified tool calling logic -> Test prompt should trigger a specific t
|
|||||||
Use the `run_command` tool to execute the fixed update task:
|
Use the `run_command` tool to execute the fixed update task:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
/opt/homebrew/Caskroom/miniconda/base/envs/ai/bin/python3 /Users/fujie/app/python/oui/openwebui-extensions/scripts/update_pipe.py
|
/opt/homebrew/Caskroom/miniconda/base/envs/ai/bin/python3 /Users/fujie/app/python/oui/openwebui-extensions/scripts/deploy_pipe.py
|
||||||
```
|
```
|
||||||
|
|
||||||
> **Mechanism**: `update_pipe.py` automatically loads the API Key from `scripts/.env` in the same directory.
|
> **Mechanism**: `deploy_pipe.py` automatically loads the API Key from `scripts/.env` in the same directory.
|
||||||
> **Verification**: Look for `✅ Successfully updated... version X.X.X`. If a 401 error occurs, remind the user to generate a new API Key in OpenWebUI and update `.env`.
|
> **Verification**: Look for `✅ Successfully updated... version X.X.X` or `✅ Successfully created...`. If a 401 error occurs, remind the user to generate a new API Key in OpenWebUI and update `.env`.
|
||||||
|
|
||||||
### Step 3: Verify via Browser Subagent (Verify)
|
### Step 3: Verify via Browser Subagent (Verify)
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ def _load_api_key() -> str:
|
|||||||
raise ValueError("api_key not found in .env file.")
|
raise ValueError("api_key not found in .env file.")
|
||||||
|
|
||||||
|
|
||||||
def update_pipe() -> None:
|
def deploy_pipe() -> None:
|
||||||
"""Push the latest local github_copilot_sdk.py content to OpenWebUI."""
|
"""Push the latest local github_copilot_sdk.py content to OpenWebUI."""
|
||||||
# 1. Load API key
|
# 1. Load API key
|
||||||
try:
|
try:
|
||||||
@@ -100,11 +100,23 @@ def update_pipe() -> None:
|
|||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
print("✅ Successfully updated GitHub Copilot Official SDK Pipe!")
|
print("✅ Successfully updated GitHub Copilot Official SDK Pipe!")
|
||||||
else:
|
else:
|
||||||
print(f"❌ Failed to update. Status: {response.status_code}")
|
print(
|
||||||
print(f" Response: {response.text[:500]}")
|
f"⚠️ Update failed with status {response.status_code}, attempting to create instead..."
|
||||||
|
)
|
||||||
|
CREATE_URL = "http://localhost:3003/api/v1/functions/create"
|
||||||
|
res_create = requests.post(
|
||||||
|
CREATE_URL, headers=headers, data=json.dumps(payload)
|
||||||
|
)
|
||||||
|
if res_create.status_code == 200:
|
||||||
|
print("✅ Successfully created GitHub Copilot Official SDK Pipe!")
|
||||||
|
else:
|
||||||
|
print(
|
||||||
|
f"❌ Failed to update or create. Status: {res_create.status_code}"
|
||||||
|
)
|
||||||
|
print(f" Response: {res_create.text[:500]}")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"❌ Request error: {e}")
|
print(f"❌ Request error: {e}")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
update_pipe()
|
deploy_pipe()
|
||||||
Reference in New Issue
Block a user