跳到主要内容

🔌 连接提供商

将 Open WebUI 连接到您的模型提供商,并在数分钟内开始对话。

Open WebUI 支持多种连接协议,包括 Ollama兼容 OpenAI 的 API 以及 Open Responses。任何支持这些协议的云端 API 或本地服务器均可开箱即用。只需添加一个 URL 和 API Key,您的模型就会出现在下拉菜单中。


工作原理

┌──────────────┐         ┌──────────────────┐         ┌──────────────┐
│ │ HTTP │ │ 推理 │ │
│ Open WebUI │────────▶│ 提供商 API │────────▶ │ 模型 │
│ (前端) │◀────────│ (云端/本地) │◀──────── │ (LLM/VLM) │
│ │ 流式 │ │ Token │ │
└──────────────┘ └──────────────────┘ └──────────────┘
  1. 您在 Open WebUI 中键入一条消息
  2. Open WebUI 将其发送到您的提供商的 API 端点
  3. 提供商在选定的模型上进行推理
  4. Token 实时流式传回给 Open WebUI
  5. 您在对话界面中看到响应
提示

添加提供商非常简单,只需在管理员设置 → 外部连接中输入 URL 和 API Key 即可。Open WebUI 会自动检测大多数提供商提供的可用模型。


云端提供商

需要账号和 API Key 的托管 API。无需任何本地硬件。

提供商模型指南
OllamaLlama, Mistral, Gemma, Phi, 以及成千上万个其他模型 (本地)Starting with Ollama →
OpenAIGPT-4o, GPT-4.1, o3, o4-miniStarting with OpenAI →
AnthropicClaude Opus, Sonnet, HaikuStarting with Anthropic →
兼容 OpenAIGoogle Gemini, DeepSeek, Mistral, Groq, OpenRouter, Amazon Bedrock, Azure, 等OpenAI-Compatible Providers →

本地服务器

在您自己的硬件上运行模型。无需 API Key,无需云端依赖。

服务器描述指南
llama.cpp使用兼容 OpenAI 的 API 进行高效的 GGUF 模型推理Starting with llama.cpp →
vLLM适用于生产环境工作负载的高吞吐量推理引擎Starting with vLLM →

兼容 OpenAI 的提供商 指南中涵盖了更多的本地服务器(LM Studio、LocalAI、Docker Model Runner、Lemonade)。


其他连接方式

功能描述指南
Open Responses使用 Open Responses 规范连接提供商Starting with Open Responses →
Function(函数)通过针对任何后端的自定义管道(Pipe)函数扩展 Open WebUIStarting with Functions →

正在寻找智能体(Agent)?

如果您想要连接的是一个自主 AI 智能体(Agent)(具有终端访问、文件操作、网页搜索等功能),而不是一个单纯的模型提供商,请参阅 连接智能体(Agent)

This content is for informational purposes only and does not constitute a warranty, guarantee, or contractual commitment. Open WebUI is provided "as is." See your license for applicable terms.