Loading... ## 背景 在内部需要部署一个AI使用平台,需要支持“联网搜索”、“附件上传”、“推理模型”等... 最终选型:openwebui,选型过程就不多少了 ## Docker部署 ```docker version: '3.3' services: open-webui: image: ghcr.io/open-webui/open-webui:main container_name: open-webui-qunhe restart: always ports: - "3100:8080" environment: - DATABASE_URL=postgresql://账号:密码@postgres:5432/数据库名称 volumes: - open-webui-qunhe:/app/backend/data postgres: image: postgres:latest container_name: postgres restart: always environment: POSTGRES_USER: 账号 POSTGRES_PASSWORD: 密码 POSTGRES_DB: 数据库名称 ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data one-api: image: justsong/one-api container_name: one-api restart: always ports: - "3000:3000" environment: - TZ=Asia/Shanghai volumes: - one-api:/data volumes: open-webui-qunhe: postgres_data: one-api: ``` 这里说下为什么我要启动一个one-api,因为我的所有openai的接口都是通过他来转发的 ### 启动 ```bash docker compose up -d ``` ## one-api配置  我这边配置了硅基的DeepSeek模型。这里的配置就算好了,因为oneapi在新版本中支持了输出:`reasoning_content` ## openwebui 支持OpenAI-R1模型推理 项目正常启动后,第一个登录的就是可以设置的管理员账号。进入管理员面板  找到函数面板,这里就是利用函数的`pipe`来完成相关的操作,官方介绍:[https://docs.openwebui.com/pipelines/pipes](https://docs.openwebui.com/pipelines/pipes) 函数地址:<button class=" btn m-b-xs btn-danger btn-addon" onclick="window.open('https:\//openwebui.com//zgccrui/deepseek_r1','_blank')"><i class="fontello fontello-gratipay"></i>点击直达(√推荐)</button>  保存完成之后,点击设置,填写如你自己对应的信息。我的信息如下:  修改完成配置之后,打开“开关”即可。这时候你在用户Chat的模型列表里面就会出现一个你得模型名字`Pro/deepseek-ai/DeepSeek-R1`得模型,选择这个模型就可以有推理过程  最后修改:2025 年 02 月 19 日 © 允许规范转载 赞 如果觉得我的文章对你有用,请随意赞赏