> For the complete documentation index, see [llms.txt](https://docs.cherryai.com.cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cherryai.com.cn/docs/zhong-wen-fan-ti/pre-basic/providers/azure-openai.md).

# Azure OpenAI

Azure OpenAI 係微軟喺 Azure 上託管嘅 OpenAI 模型服務，適合需要企業合規、數據駐留承諾、或者微軟生態嘅團隊。

## 前置準備

* 已開通 Azure 訂閱
* 已喺 Azure Portal 入面申請並通過 Azure OpenAI Service 存取審批
* 已建立至少一個 **資源（Resource）** 同 **部署（Deployment）**

## 獲取 API Key

* Azure Portal → 你嘅 Azure OpenAI 資源 → `Keys 同 Endpoint`
* 複製 `KEY 1` 或 `KEY 2`，記低 `Endpoint`（例如 `https://<your-name>.openai.azure.com/`）

## 喺 Cherry Studio 配置

* 打開 `設定 → 模型服務`，搵到 **Azure OpenAI** Provider 進入詳情頁
* **API 密鑰**：填入複製咗嘅 KEY
* **API 地址**：填入資源嘅 Endpoint（唔使帶尾端路徑）
* **API Version**：喺專屬欄位填入你嘅部署嘅 API 版本（例如 `2024-08-01-preview`）
* 撳 **獲取模型列表**，或者手動加返你已喺 Azure 上部署嘅模型名（即 Deployment Name，而唔係 OpenAI 原始模型 ID）

{% hint style="warning" %}
**Deployment Name 同 Model ID**：Azure 用嘅係你畀部署改嘅名（如 `gpt-4o-prod`），唔係 `gpt-4o` 呢種原始 ID。填錯會 404。
{% endhint %}

## 推薦用法

* **gpt-4o / gpt-4o-mini**：通用對話、Agent
* **gpt-4 turbo**：長上下文
* **text-embedding-3-**\*：嵌入模型，可用於知識庫

## 常見問題

* **401 Unauthorized**：檢查 Key 係咪正確、Endpoint 尾端係咪多咗斜線
* **404 Not Found**：檢查 Deployment Name 係咪同 Azure 上一致、API Version 係咪已填
* **429 Throttled**：檢查 Azure 配額（Quota & Limits 頁）

***

### 取得幫助同提交反饋

如果你喺配置或者使用過程中遇到任何疑問、Bug，或者有功能改善建議，請參考 [反饋與建議](/docs/zhong-wen-fan-ti/question-contact/suggestions.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.cherryai.com.cn/docs/zhong-wen-fan-ti/pre-basic/providers/azure-openai.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.
