Spaces:
Sleeping
Sleeping
Deploy OpenWebUI update from local
Browse files- .gitattributes +0 -35
- Dockerfile +8 -0
- README.md +32 -0
- config/prompt_suggestions.json +20 -0
- docker-entrypoint.sh +11 -0
.gitattributes
DELETED
|
@@ -1,35 +0,0 @@
|
|
| 1 |
-
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
-
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
-
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
-
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
-
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
-
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
-
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
-
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
-
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
-
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
-
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
-
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
-
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
-
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
-
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
-
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
-
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
-
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
-
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
-
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
-
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
-
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
-
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
-
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
-
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
-
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
-
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
-
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
-
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
-
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
-
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
-
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
-
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
-
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
-
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Dockerfile
CHANGED
|
@@ -1 +1,9 @@
|
|
| 1 |
FROM ghcr.io/open-webui/open-webui:main
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
FROM ghcr.io/open-webui/open-webui:main
|
| 2 |
+
|
| 3 |
+
COPY config/ /app/montaigne-config/
|
| 4 |
+
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
| 5 |
+
|
| 6 |
+
RUN chmod +x /docker-entrypoint.sh
|
| 7 |
+
|
| 8 |
+
ENTRYPOINT ["/docker-entrypoint.sh"]
|
| 9 |
+
CMD ["bash", "/start.sh"]
|
README.md
CHANGED
|
@@ -13,3 +13,35 @@ pinned: false
|
|
| 13 |
OpenWebUI deployment for the Montaigne chatbot.
|
| 14 |
|
| 15 |
This Space connects to the Montaigne FastAPI backend through an OpenAI-compatible API exposed at `/v1`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
OpenWebUI deployment for the Montaigne chatbot.
|
| 14 |
|
| 15 |
This Space connects to the Montaigne FastAPI backend through an OpenAI-compatible API exposed at `/v1`.
|
| 16 |
+
|
| 17 |
+
## Conversation Starters
|
| 18 |
+
|
| 19 |
+
The default prompt suggestions are configured in `config/prompt_suggestions.json`. These Montaigne-style prompts appear on the empty chat screen.
|
| 20 |
+
|
| 21 |
+
**To customize:**
|
| 22 |
+
|
| 23 |
+
1. Edit `config/prompt_suggestions.json` with your prompts
|
| 24 |
+
2. Redeploy the Space
|
| 25 |
+
|
| 26 |
+
The container entrypoint automatically loads `config/prompt_suggestions.json` into the OpenWebUI `DEFAULT_PROMPT_SUGGESTIONS` setting at startup. You only need to set the env var manually if you want to override the repo defaults from Hugging Face Space settings.
|
| 27 |
+
|
| 28 |
+
**Format:**
|
| 29 |
+
|
| 30 |
+
```json
|
| 31 |
+
{
|
| 32 |
+
"default_prompt_suggestions": [
|
| 33 |
+
{
|
| 34 |
+
"title": ["First line", "Second line (optional)"],
|
| 35 |
+
"content": "Full prompt text sent to the model"
|
| 36 |
+
}
|
| 37 |
+
]
|
| 38 |
+
}
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
+
## Environment Variables
|
| 42 |
+
|
| 43 |
+
| Variable | Description |
|
| 44 |
+
|----------|-------------|
|
| 45 |
+
| `DEFAULT_PROMPT_SUGGESTIONS` | Optional override for the repo-managed prompt suggestions |
|
| 46 |
+
| `OPENAI_API_KEY` | Your API key for the backend LLM provider |
|
| 47 |
+
| `OPENAI_API_BASE` | Backend URL: `https://tgrumb-michel.hf.space/v1` |
|
config/prompt_suggestions.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"default_prompt_suggestions": [
|
| 3 |
+
{
|
| 4 |
+
"title": ["What occupies your thoughts", "most lately?"],
|
| 5 |
+
"content": "What occupies your thoughts most lately?"
|
| 6 |
+
},
|
| 7 |
+
{
|
| 8 |
+
"title": ["Have you ever changed", "your mind about something important?"],
|
| 9 |
+
"content": "Have you ever found yourself changing your mind about something important?"
|
| 10 |
+
},
|
| 11 |
+
{
|
| 12 |
+
"title": ["When you look inward,", "what do you discover?"],
|
| 13 |
+
"content": "When you look inward, what do you discover about yourself?"
|
| 14 |
+
},
|
| 15 |
+
{
|
| 16 |
+
"title": ["How do you balance", "action with reflection?"],
|
| 17 |
+
"content": "How do you balance action with reflection in your life?"
|
| 18 |
+
}
|
| 19 |
+
]
|
| 20 |
+
}
|
docker-entrypoint.sh
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
set -e
|
| 3 |
+
|
| 4 |
+
SUGGESTIONS_FILE="/app/montaigne-config/prompt_suggestions.json"
|
| 5 |
+
|
| 6 |
+
if [ -z "$DEFAULT_PROMPT_SUGGESTIONS" ] && [ -f "$SUGGESTIONS_FILE" ]; then
|
| 7 |
+
echo "Loading Montaigne prompt suggestions from $SUGGESTIONS_FILE..."
|
| 8 |
+
export DEFAULT_PROMPT_SUGGESTIONS="$(python3 -c "import json; from pathlib import Path; data = json.loads(Path('$SUGGESTIONS_FILE').read_text(encoding='utf-8')); print(json.dumps(data.get('default_prompt_suggestions', []), separators=(',', ':')))" )"
|
| 9 |
+
fi
|
| 10 |
+
|
| 11 |
+
exec "$@"
|