mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-27 00:17:31 +00:00
v4.6.6-fix (#676)
This commit is contained in:
@@ -32,7 +32,7 @@ FastGPT 的 API Key **有 2 类**,一类是全局通用的 key (无法直接
|
||||
OpenAPI 中,所有的接口都通过 Header.Authorization 进行鉴权。
|
||||
|
||||
```
|
||||
baseUrl: "https://fastgpt.run/api"
|
||||
baseUrl: "https://api.fastgpt.in/api"
|
||||
headers: {
|
||||
Authorization: "Bearer {{apikey}}"
|
||||
}
|
||||
@@ -41,7 +41,7 @@ headers: {
|
||||
**发起应用对话示例**
|
||||
|
||||
```sh
|
||||
curl --location --request POST 'https://fastgpt.run/api/v1/chat/completions' \
|
||||
curl --location --request POST 'https://api.fastgpt.in/api/v1/chat/completions' \
|
||||
--header 'Authorization: Bearer fastgpt-xxxxxx' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
|
@@ -25,7 +25,7 @@ weight: 852
|
||||
{{< markdownify >}}
|
||||
|
||||
```bash
|
||||
curl --location --request POST 'https://fastgpt.run/api/v1/chat/completions' \
|
||||
curl --location --request POST 'https://api.fastgpt.in/api/v1/chat/completions' \
|
||||
--header 'Authorization: Bearer fastgpt-xxxxxx' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
|
@@ -18,7 +18,7 @@ weight: 853
|
||||
**请求示例**
|
||||
|
||||
```bash
|
||||
curl --location --request POST 'https://fastgpt.run/api/support/wallet/bill/createTrainingBill' \
|
||||
curl --location --request POST 'https://api.fastgpt.in/api/support/wallet/bill/createTrainingBill' \
|
||||
--header 'Authorization: Bearer {{apikey}}' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
@@ -46,7 +46,7 @@ data 为 billId,可用于添加知识库数据时进行账单聚合。
|
||||
{{< markdownify >}}
|
||||
|
||||
```bash
|
||||
curl --location --request POST 'https://fastgpt.run/api/core/dataset/data/pushData' \
|
||||
curl --location --request POST 'https://api.fastgpt.in/api/core/dataset/data/pushData' \
|
||||
--header 'Authorization: Bearer apikey' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
@@ -162,7 +162,7 @@ A2:
|
||||
{{< markdownify >}}
|
||||
|
||||
```bash
|
||||
curl --location --request POST 'https://fastgpt.run/api/core/dataset/searchTest' \
|
||||
curl --location --request POST 'https://api.fastgpt.in/api/core/dataset/searchTest' \
|
||||
--header 'Authorization: Bearer fastgpt-xxxxx' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
|
@@ -53,9 +53,9 @@ weight: 860
|
||||
|
||||
在分享链接的地址中,增加一个额外的参数: authToken。例如:
|
||||
|
||||
原始的链接:`https://fastgpt.run/chat/share?shareId=648aaf5ae121349a16d62192`
|
||||
原始的链接:`https://share.fastgpt.in/chat/share?shareId=648aaf5ae121349a16d62192`
|
||||
|
||||
完整链接: `https://fastgpt.run/chat/share?shareId=648aaf5ae121349a16d62192&authToken=userid12345`
|
||||
完整链接: `https://share.fastgpt.in/chat/share?shareId=648aaf5ae121349a16d62192&authToken=userid12345`
|
||||
|
||||
这个`authToken`通常是你系统生成的用户唯一凭证(Token之类的)。FastGPT 会在鉴权接口的`body`中携带 token={{authToken}} 的参数。
|
||||
|
||||
@@ -342,9 +342,9 @@ export default async function (ctx: FunctionContext) {
|
||||
|
||||
### 3. 修改分享链接参数
|
||||
|
||||
源分享链接:`https://fastgpt.run/chat/share?shareId=64be36376a438af0311e599c`
|
||||
源分享链接:`https://share.fastgpt.in/chat/share?shareId=64be36376a438af0311e599c`
|
||||
|
||||
修改后:`https://fastgpt.run/chat/share?shareId=64be36376a438af0311e599c&authToken=fastgpt`
|
||||
修改后:`https://share.fastgpt.in/chat/share?shareId=64be36376a438af0311e599c&authToken=fastgpt`
|
||||
|
||||
### 4. 测试效果
|
||||
|
||||
|
Reference in New Issue
Block a user