From f39b8ccd3a079509840e4e757d3bd32056d72782 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=AB=E5=B0=8F=E6=85=A7?= Date: Mon, 30 Sep 2024 14:36:51 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=95=85=E9=9A=9C=E8=BD=AC=E7=A7=BB?= =?UTF-8?q?=E6=9C=BA=E5=88=B6=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/Serverless API.mdx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/Serverless API.mdx b/docs/Serverless API.mdx index 1b5e87a..7ef0202 100644 --- a/docs/Serverless API.mdx +++ b/docs/Serverless API.mdx @@ -41,4 +41,14 @@ Serverless API 为开发者提供一个便捷的方式来调用不同种类的 3. **本地调用 API 进行推理**:通过挂件测试正常,可以选择 “API” 形式调用,选择对应的编程语言或者工具,例如 Python,勾选 “添加令牌”,即可拷贝对应的代码在本地进行执行。我们暂时只给出了 Python/JavaScript/cURL 的示例,其他语言可以参考这些示例进行编写。 -![alt text](/img/base/serverless-api-call.jpeg) \ No newline at end of file +![alt text](/img/base/serverless-api-call.jpeg) + +## 故障转移机制 +API 提供了故障转移机制,确保在模型推理过程中出现故障时,系统能够自动切换至其他可用算力模型,从而保障服务的持续稳定运行。 + +**使用方式**: 在调用 API 时,通过添加请求头 `X-Failover-Enabled` 参数为 `true`,即可启用故障转移机制。如当前算力模型支持故障转移,默认则会启用故障转移机制。参数为 `false` 时,则不启用故障转移机制,出现故障时系统会立即返回异常信息。 + +:::warning +1. 启用故障转移机制后,若当前算力模型出现故障,系统会自动切换到可用算力进行处理。扣费将按照最后一次成功调用的算力模型计算。用户可在"[使用日志](https://ai.gitee.com/dashboard/statistics/usage-logs)"中查看到调用链路。如果不接受该扣费方式,建议不要开启故障转移机制。 + +::: \ No newline at end of file -- Gitee From 271f2e1bdbbfaba28137330f0667b5b3c6f40fab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=AB=E5=B0=8F=E6=85=A7?= Date: Mon, 30 Sep 2024 14:41:12 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=95=85=E9=9A=9C=E8=BD=AC=E7=A7=BB?= =?UTF-8?q?=E6=9C=BA=E5=88=B6=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/Serverless API.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Serverless API.mdx b/docs/Serverless API.mdx index 7ef0202..4292a90 100644 --- a/docs/Serverless API.mdx +++ b/docs/Serverless API.mdx @@ -46,9 +46,9 @@ Serverless API 为开发者提供一个便捷的方式来调用不同种类的 ## 故障转移机制 API 提供了故障转移机制,确保在模型推理过程中出现故障时,系统能够自动切换至其他可用算力模型,从而保障服务的持续稳定运行。 -**使用方式**: 在调用 API 时,通过添加请求头 `X-Failover-Enabled` 参数为 `true`,即可启用故障转移机制。如当前算力模型支持故障转移,默认则会启用故障转移机制。参数为 `false` 时,则不启用故障转移机制,出现故障时系统会立即返回异常信息。 +**使用方式**: 在调用 API 时,通过添加请求头 `X-Failover-Enabled` 参数为 `true`,即可启用故障转移机制。参数为 `false` 时,则不启用故障转移机制,出现故障时系统会立即返回异常信息。 :::warning 1. 启用故障转移机制后,若当前算力模型出现故障,系统会自动切换到可用算力进行处理。扣费将按照最后一次成功调用的算力模型计算。用户可在"[使用日志](https://ai.gitee.com/dashboard/statistics/usage-logs)"中查看到调用链路。如果不接受该扣费方式,建议不要开启故障转移机制。 - +2. 如果未添加请求头 X-Failover-Enabled 参数,且当前算力模型支持故障转移,则系统会默认启用故障转移机制。 ::: \ No newline at end of file -- Gitee From 278ac5ffcb4cbfecf1a17fe74e2c2beb08319318 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=AB=E5=B0=8F=E6=85=A7?= Date: Wed, 9 Oct 2024 17:24:37 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=95=85=E9=9A=9C=E8=BD=AC=E7=A7=BB?= =?UTF-8?q?=E6=9C=BA=E5=88=B6=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/Serverless API.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Serverless API.mdx b/docs/Serverless API.mdx index 4292a90..1c133e0 100644 --- a/docs/Serverless API.mdx +++ b/docs/Serverless API.mdx @@ -49,6 +49,6 @@ API 提供了故障转移机制,确保在模型推理过程中出现故障时 **使用方式**: 在调用 API 时,通过添加请求头 `X-Failover-Enabled` 参数为 `true`,即可启用故障转移机制。参数为 `false` 时,则不启用故障转移机制,出现故障时系统会立即返回异常信息。 :::warning -1. 启用故障转移机制后,若当前算力模型出现故障,系统会自动切换到可用算力进行处理。扣费将按照最后一次成功调用的算力模型计算。用户可在"[使用日志](https://ai.gitee.com/dashboard/statistics/usage-logs)"中查看到调用链路。如果不接受该扣费方式,建议不要开启故障转移机制。 +1. 启用故障转移机制后,若当前算力模型出现故障,系统会自动切换到可用算力进行处理。扣费将按照最后一次成功调用的算力模型计算,并扣除当前资源包金额。用户可在"[使用日志](https://ai.gitee.com/dashboard/statistics/usage-logs)"中查看到调用链路。如果不接受该扣费方式,建议不要开启故障转移机制。 2. 如果未添加请求头 X-Failover-Enabled 参数,且当前算力模型支持故障转移,则系统会默认启用故障转移机制。 ::: \ No newline at end of file -- Gitee