diff --git a/docs/Serverless API-integration.md b/docs/Serverless API-integration.md index a8eefde96c2786e972eb1e90f1931821246add32..f692bd3dae0a2afad055a6ca9b90a3db81706aec 100644 --- a/docs/Serverless API-integration.md +++ b/docs/Serverless API-integration.md @@ -33,11 +33,12 @@ ## 操作步骤 -1. **获取** **API** **路径:** +**1. 获取** **API** **路径:** 请在 Serverless API 页选择你想要使用的模型,点击调用,获取它的 API 调用地址,如下所示: -_https://ai.gitee.com/api/serverless/<Model>/chat/completions_ +_https:\//ai.gitee.com/api/serverless/<Model>/chat/completions_ + @@ -45,7 +46,7 @@ _https://ai.gitee.com/api/serverless/<Model>/chat/completions_ -2. 通过上面获取的路径,通常需要将路径拆分,填写下方信息: +**2. 通过上面获取的路径,通常需要将路径拆分,填写下方信息:** - API Host (Domain):_https://ai.gitee.com/_ - API Path:_api/serverless/<Model>/chat/completions_ @@ -56,7 +57,7 @@ _https://ai.gitee.com/api/serverless/<Model>/chat/completions_ -3. 获取 API key: +**3. 获取 API key:** 前往 Gitee AI 工作台 - 设置 - 访问令牌,创建你的 API Key @@ -64,7 +65,9 @@ _https://ai.gitee.com/api/serverless/<Model>/chat/completions_ 在一些业务场景中,可能需要让客户端直接调用 Serverless API ,这时候需要将 Access Token 传递给客户端,为了安全起见,建议将 Access Token 存储在后端,通过后端服务代理调用 Serverless API。 -如果希望直接在客户端使用 Access Token ,Gitee AI 提供了创建临时 Token 的接口,该接口的详细使用方法请看 `https://ai.gitee.com/docs/openapi/v1` + + +如果希望直接在客户端使用 Access Token ,Gitee AI 提供了创建临时 Token 的接口,该接口的详细使用方法请查看 **[创建临时 Access Token](https://ai.gitee.com/docs/openapi/v1#tag/account/POST/account/temporary-token)** ## 集成 OpenCat @@ -82,7 +85,7 @@ OpenCat 是一个 AI 对话聊天客户端,支持 iOS 和 macOS,在对话框 3. 输入 API Domain、API Path、API Key -- API Domain:https://ai.gitee.com/ +- API Domain:_https://ai.gitee.com/_ - API Path:不同模型的路径不同,示例:_api/serverless/<Model>/chat/completions_ - API key: 在 Gitee AI 工作台-设置复制访问令牌(API key)