> For the complete documentation index, see [llms.txt](https://docs.verge.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.verge.io/automate-protect-and-extend/zh/si-you-ai/overview.md).

# 私有 AI 概览

VergeOS 私有 AI 使您能够在 VergeOS 环境中本地部署和运行大型语言模型（LLM）。模型完全运行在您的基础设施上，不会进行外部 API 调用或数据传输。

## 架构

私有 AI 由五个核心组件组成：

```mermaid
graph LR
    A[客户端应用] --> B[兼容 OpenAI 的 API]
    B --> C[助手]
    C --> D[模型]
    D --> E[工作进程]
```

### 模型

模型是提供 AI 能力的 LLM 文件。VergeOS 支持：

* **精选模型**：可一键安装的预配置模型（Llama、Gemma、Phi、Qwen 等）
* **自定义模型**：来自 Hugging Face 或其他来源的任何 GGUF 格式模型

模型定义资源需求（CPU 核心数、RAM、GPU 分配）和推理参数（上下文大小、并发请求）。

### 助手

助手是已配置的实例，用于定义用户和应用程序如何与模型交互。每个助手指定：

* 使用哪个模型
* 系统提示词（行为指令）
* 温度及其他生成参数
* RAG 场景的上下文评分
* 用于文档上下文的工作区文件

多个助手可以使用相同的底层模型，但配置不同。

### Workers

工作进程是运行模型的推理引擎。系统管理两种类型：

* **AI-Helper Worker**：处理 API 请求和路由（自动启动）
* **模型 Worker**：为每个正在运行的模型执行推理（根据最小/最大工作进程设置自动扩缩）

### 聊天会话

聊天会话会保留对话历史和上下文。会话可以是：

* 通过 VergeOS 界面创建，用于交互式测试
* 通过 API 以编程方式管理，用于应用集成

### 兼容 OpenAI 的 API

该 API 在以下地址提供标准 OpenAI 端点 `https://<your-vergeos-url>/v1`，从而可与以下内容集成：

* 任何 OpenAI 客户端库（Python、JavaScript、Go 等）
* IDE 和开发工具
* 为 OpenAI/Ollama 构建的现有应用程序

请参见 [兼容 OpenAI 的 API](/automate-protect-and-extend/zh/si-you-ai/open-ai-router.md) 以查看端点文档。

## 前提条件

* VergeOS 26.0 或更高版本
* 足够的 RAM 用于模型文件（因模型而异，通常为 5-50GB）
* 用于下载模型的存储空间

### GPU 支持

推荐在生产工作负载中使用 GPU 加速。VergeOS 通过资源组支持来自任何厂商（NVIDIA、AMD、Intel）的 GPU。模型也可以在仅 CPU 系统上运行，但推理速度会更慢。

## 快速开始

1. 导航到 **AI → 模型**
2. 点击 **点击安装** 在精选模型上，或点击 **新建模型** 用于自定义模型
3. 配置资源分配（CPU 核心、RAM、GPU）
4. 系统会随新模型自动创建一个助手
5. 通过以下方式测试 **AI → 助手 → \[您的助手] → 聊天**

有关详细设置说明，请参阅 [配置指南](/automate-protect-and-extend/zh/si-you-ai/configuration.md).

## 相关文档

* [配置](/automate-protect-and-extend/zh/si-you-ai/configuration.md) - 模型和助手设置
* [兼容 OpenAI 的 API](/automate-protect-and-extend/zh/si-you-ai/open-ai-router.md) - API 端点和集成
* [聊天会话](/automate-protect-and-extend/zh/si-you-ai/chat-sessions.md) - 交互式界面使用


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.verge.io/automate-protect-and-extend/zh/si-you-ai/overview.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
