Files
AIChat/open_webui/openwebui-service.xml
T
2026-08-18 10:03:35 +08:00

57 lines
2.1 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<service>
<id>ai-stack-openwebui</id>
<name>AI Stack - Open WebUI</name>
<description>Open WebUI chat interface connected to LiteLLM, runs on port 3000</description>
<!--
使用 WinSW 的 %BASE% 相对路径。
%BASE% = WinSW.exe 所在目录(本文件所在目录:...\open_webui)。
现在使用专属 venv..\open_webui\venv,支持任意盘符部署。
-->
<executable>%BASE%\venv\Scripts\open-webui.exe</executable>
<arguments>serve --port 3000</arguments>
<workingdirectory>%BASE%\..</workingdirectory>
<!-- 指向本地 LiteLLM -->
<env name="OPENAI_API_BASE_URL" value="http://127.0.0.1:4000/v1"/>
<env name="OPENAI_API_KEY" value="dummy"/>
<!-- 关闭登录认证,内网/测试环境使用;生产环境建议改为 true -->
<env name="WEBUI_AUTH" value="false"/>
<!-- 数据持久化目录 -->
<env name="DATA_DIR" value="%BASE%\..\.data\open-webui"/>
<!-- 禁用运行时 pip 安装,加快启动速度 -->
<env name="ENABLE_PIP_INSTALL_FRONTMATTER_REQUIREMENTS" value="False"/>
<!-- 禁止模型自动更新(避免启动时联网下载) -->
<env name="RAG_EMBEDDING_MODEL_AUTO_UPDATE" value="false"/>
<env name="RAG_RERANKING_MODEL_AUTO_UPDATE" value="false"/>
<env name="WHISPER_MODEL_AUTO_UPDATE" value="false"/>
<!-- 日志,滚动模式防止无限增长 -->
<logpath>%BASE%\..\logs\openwebui</logpath>
<log mode="roll">
<sizeThreshold>10240</sizeThreshold>
<keepFiles>5</keepFiles>
</log>
<!-- 开机自动启动,延迟启动确保 LiteLLM 先就绪 -->
<startmode>Automatic</startmode>
<delayedAutoStart>true</delayedAutoStart>
<!-- 失败自动重启 -->
<onfailure action="restart" delay="10 sec"/>
<resetfailure>1 hour</resetfailure>
<!-- 停止等待时间 -->
<stoptimeout>15 sec</stoptimeout>
<!-- 不显示控制台窗口 -->
<hidewindow>true</hidewindow>
<!-- 依赖 LiteLLM 服务,确保 LiteLLM 先启动 -->
<depend>ai-stack-litellm</depend>
</service>