-
Notifications
You must be signed in to change notification settings - Fork 14
feat: add openweb ui doc #122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,141 @@ | ||||||||||
| products: | ||||||||||
| - Alauda AI | ||||||||||
| kind: | ||||||||||
| - Solution | ||||||||||
| ProductsVersion: | ||||||||||
| - 4.x | ||||||||||
| --- | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这个metada的格式不对啊,应该是: |
||||||||||
|
|
||||||||||
| # OpenWebUI | ||||||||||
|
|
||||||||||
| ## Overview | ||||||||||
| OpenWebUI is an open-source AI Web interface that supports docking with multiple OpenAI protocol-compatible inference backends (such as vLLM, MLServer, XInference, etc.) through a unified entry point. It is used for scenarios such as text generation, multimodal input, and voice input. It provides an extensible external tool mechanism to facilitate the integration of retrieval, function calling, and third-party services. It is suitable for deployment in containers locally or in the cloud, supporting persistent data and Ingress-based HTTPS access. | ||||||||||
|
|
||||||||||
| ## Basic Features | ||||||||||
| - **Conversation & Text Generation**: Support system prompts, adjustable parameters (temperature, length, etc.), and session management. | ||||||||||
| - **Multimodal & Voice**: Images/documents as context, voice input/transcription (dependent on backend capabilities). | ||||||||||
| - **External Tool Extension**: Can call retrieval, databases, HTTP APIs, etc., to build tool-enhanced workflows. | ||||||||||
| - **Data & Security**: Sessions and configurations can be persisted; can integrate with authentication, rate limiting, logging/monitoring. | ||||||||||
|
|
||||||||||
| ## Backend Integration | ||||||||||
| - **Protocol Compatibility**: Support OpenAI API style backends (such as vLLM, MLServer, XInference, TGI, etc.). | ||||||||||
| - **Connection Parameters**: Base URL (e.g., `http(s)://{backend}/v1`), API Key, model name, and default inference parameters. | ||||||||||
| - **Multiple Backends**: configured in the UI, allowing switching between different inference service backends. | ||||||||||
|
|
||||||||||
| ## Deployment Scheme | ||||||||||
| Create the following resources in order. In this case, choose an independent `open-webui-ns` namespace. You can choose an available namespace as needed. | ||||||||||
|
|
||||||||||
| ### Namespace | ||||||||||
| ```bash | ||||||||||
| kubectl create ns open-webui-ns | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| ### Create the specific deployment | ||||||||||
| ```yaml | ||||||||||
| apiVersion: apps/v1 | ||||||||||
| kind: Deployment | ||||||||||
| metadata: | ||||||||||
| labels: | ||||||||||
| app: open-webui | ||||||||||
| name: open-webui | ||||||||||
| namespace: open-webui-ns | ||||||||||
| spec: | ||||||||||
| replicas: 1 | ||||||||||
| selector: | ||||||||||
| matchLabels: | ||||||||||
| app: open-webui | ||||||||||
| template: | ||||||||||
| metadata: | ||||||||||
| labels: | ||||||||||
| app: open-webui | ||||||||||
| spec: | ||||||||||
| volumes: | ||||||||||
| - name: webui-data | ||||||||||
| emptyDir: {} | ||||||||||
|
Comment on lines
+52
to
+54
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical: emptyDir does not provide persistence. The deployment uses 💾 Proposed fix using PersistentVolumeClaimFirst, create a PersistentVolumeClaim: apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: open-webui-pvc
namespace: open-webui-ns
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5GiThen update the Deployment: volumes:
- name: webui-data
- emptyDir: {}
+ persistentVolumeClaim:
+ claimName: open-webui-pvc🤖 Prompt for AI Agents
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 小兔子给的建议是,不要用 emtyDir,应该用pvc,你看下呢。 emtypDir, pod重启,数据就没了。 |
||||||||||
| containers: | ||||||||||
| - image: ghcr.io/open-webui/open-webui | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result: Latest stable Open WebUI container image on GHCR is Use:
(For production, Open WebUI recommends pinning a specific release tag like this rather than floating tags such as Pin the container image to a specific version. The image - - image: ghcr.io/open-webui/open-webui
+ - image: ghcr.io/open-webui/open-webui:v0.7.2📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| name: open-webui | ||||||||||
| ports: | ||||||||||
| - containerPort: 8080 | ||||||||||
| env: | ||||||||||
| - name: ENABLE_DIRECT_CONNECTIONS | ||||||||||
| value: "true" | ||||||||||
|
Comment on lines
+61
to
+62
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Document security implications of enabling direct connections. Setting 📋 Suggested security guidance to addAdd a security considerations section after the deployment or in the environment variables section: ### Security Considerations
**ENABLE_DIRECT_CONNECTIONS**: When set to `true`, users can configure OpenWebUI to connect to external inference services. Consider the following:
- Only enable this in trusted environments or when users are authenticated and authorized
- External connections may expose sensitive data or credentials
- Monitor outbound connections to prevent data exfiltration
- Consider using network policies to restrict egress traffic
- For production environments, consider setting this to `false` and pre-configuring allowed backends🤖 Prompt for AI Agents |
||||||||||
| - name: OPENAI_API_BASE_URL | ||||||||||
| value: http://example-predictor/v1 | ||||||||||
|
Comment on lines
+63
to
+64
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Clarify that the URL is a placeholder example. The value - name: OPENAI_API_BASE_URL
- value: http://example-predictor/v1
+ value: http://example-predictor/v1 # REPLACE with actual inference service URLAdditionally, add a note in the documentation emphasizing this must be replaced with the actual service URL before deployment. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| - name: PORT | ||||||||||
| value: "8080" | ||||||||||
| volumeMounts: | ||||||||||
| - name: webui-data | ||||||||||
| mountPath: /app/backend/data | ||||||||||
| resources: | ||||||||||
| requests: | ||||||||||
| cpu: 1000m | ||||||||||
| memory: 128Mi | ||||||||||
| limits: | ||||||||||
| cpu: 2000m | ||||||||||
| memory: 1Gi | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| ## Important environment values | ||||||||||
|
|
||||||||||
| Relative environment values should be configured. | ||||||||||
|
|
||||||||||
| ### ENABLE_DIRECT_CONNECTIONS | ||||||||||
| * Set to true to enable external connections. | ||||||||||
| * Purpose: Allows adding additional external inference service backends within OpenWebUI. | ||||||||||
|
|
||||||||||
| ### OPENAI_API_BASE_URL | ||||||||||
| * Specifies the default inference service endpoint. | ||||||||||
| * If OpenWebUI and the inference service are deployed in the same cluster, use the service’s internal cluster address. | ||||||||||
| * For the address details, refer to: **AML Business View / Inference Service / Inference Service Details / Access Method**. | ||||||||||
| * Value format: `{{Cluster Internal URL}}/v1`. | ||||||||||
|
|
||||||||||
|
|
||||||||||
| ### Verification | ||||||||||
| ```bash | ||||||||||
| kubectl get deployment open-webui -n open-webui-ns -w | ||||||||||
| ``` | ||||||||||
| Wait until the deployment status is `1/1 Ready`. | ||||||||||
|
|
||||||||||
| ## Access OpenWebUI | ||||||||||
|
|
||||||||||
| ### 1. View OpenWebUI via NodePort Service | ||||||||||
| Create the following resource: | ||||||||||
|
|
||||||||||
| ```yaml | ||||||||||
| apiVersion: v1 | ||||||||||
| kind: Service | ||||||||||
| metadata: | ||||||||||
| labels: | ||||||||||
| app: open-webui | ||||||||||
| name: svc-open-webui | ||||||||||
| namespace: open-webui-ns | ||||||||||
| spec: | ||||||||||
| type: NodePort | ||||||||||
| ports: | ||||||||||
| - port: 8080 | ||||||||||
| protocol: TCP | ||||||||||
| targetPort: 8080 | ||||||||||
| selector: | ||||||||||
| app: open-webui | ||||||||||
| ``` | ||||||||||
| Check the relevant port and node IP to access the page. | ||||||||||
|
|
||||||||||
| ### 2. Initial Settings | ||||||||||
| When accessing OpenWebUI for the first time, you need to register. Choose a strong password for the administrator account. | ||||||||||
|
|
||||||||||
| ### 3. Add Inference Service | ||||||||||
| Go to **Settings -> Connections -> Add Connection**. | ||||||||||
| Here you will be required to add the inference service address. | ||||||||||
| You can obtain the cluster external access methods via **AML Business View / Inference Service / Inference Service Details / Access Method**. | ||||||||||
| Fill it in afterwards. Please use the cluster **external** access method. | ||||||||||
| In the **Add Connection** popup, fill in: | ||||||||||
| `{{Cluster External URL}}/v1` | ||||||||||
|
|
||||||||||
| Click the icon on the right to verify connectivity. After success, click save. Return to the chat page to select the existing inference service for use. | ||||||||||
|
|
||||||||||
| ### 4. Use Inference Service | ||||||||||
| Enter the chat page, select the uploaded inference service, and explore more features, such as: | ||||||||||
| - Voice input | ||||||||||
| - Multimodal input | ||||||||||
| - External tools | ||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix YAML front matter structure.
The YAML front matter has structural issues with indentation and key-value pairing. Lines 2-5 appear malformed.
📝 Proposed fix for YAML structure
🤖 Prompt for AI Agents