mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-28 09:03:53 +00:00
@@ -7,11 +7,11 @@ toc: true
|
||||
weight: 705
|
||||
---
|
||||
|
||||
本文档介绍了如何设置开发环境以构建和测试 [FastGPT](https://fastgpt.in),。
|
||||
本文档介绍了如何设置开发环境以构建和测试 [FastGPT](https://tryfastgpt.ai),。
|
||||
|
||||
## 前置依赖项
|
||||
|
||||
您需要在计算机上安装和配置以下依赖项才能构建 [FastGPT](https://fastgpt.in):
|
||||
您需要在计算机上安装和配置以下依赖项才能构建 [FastGPT](https://tryfastgpt.ai):
|
||||
|
||||
- [Git](http://git-scm.com/)
|
||||
- [Docker](https://www.docker.com/)(构建镜像)
|
||||
|
@@ -32,7 +32,7 @@ FastGPT 的 API Key **有 2 类**,一类是全局通用的 key (无法直接
|
||||
OpenAPI 中,所有的接口都通过 Header.Authorization 进行鉴权。
|
||||
|
||||
```
|
||||
baseUrl: "https://api.fastgpt.in/api"
|
||||
baseUrl: "https://api.tryfastgpt.ai/api"
|
||||
headers: {
|
||||
Authorization: "Bearer {{apikey}}"
|
||||
}
|
||||
@@ -41,7 +41,7 @@ headers: {
|
||||
**发起应用对话示例**
|
||||
|
||||
```sh
|
||||
curl --location --request POST 'https://api.fastgpt.in/api/v1/chat/completions' \
|
||||
curl --location --request POST 'https://api.tryfastgpt.ai/api/v1/chat/completions' \
|
||||
--header 'Authorization: Bearer fastgpt-xxxxxx' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
|
@@ -29,7 +29,7 @@ weight: 852
|
||||
{{< markdownify >}}
|
||||
|
||||
```bash
|
||||
curl --location --request POST 'https://api.fastgpt.in/api/v1/chat/completions' \
|
||||
curl --location --request POST 'https://api.tryfastgpt.ai/api/v1/chat/completions' \
|
||||
--header 'Authorization: Bearer fastgpt-xxxxxx' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
|
@@ -22,7 +22,7 @@ weight: 853
|
||||
**新例子**
|
||||
|
||||
```bash
|
||||
curl --location --request POST 'https://api.fastgpt.in/api/support/wallet/usage/createTrainingUsage' \
|
||||
curl --location --request POST 'https://api.tryfastgpt.ai/api/support/wallet/usage/createTrainingUsage' \
|
||||
--header 'Authorization: Bearer {{apikey}}' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
@@ -34,7 +34,7 @@ curl --location --request POST 'https://api.fastgpt.in/api/support/wallet/usage/
|
||||
**x例子**
|
||||
|
||||
```bash
|
||||
curl --location --request POST 'https://api.fastgpt.in/api/support/wallet/bill/createTrainingBill' \
|
||||
curl --location --request POST 'https://api.tryfastgpt.ai/api/support/wallet/bill/createTrainingBill' \
|
||||
--header 'Authorization: Bearer {{apikey}}' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
@@ -466,7 +466,7 @@ curl --location --request POST 'http://localhost:3000/api/core/dataset/collectio
|
||||
--header 'Authorization: Bearer {{authorization}}' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"link":"https://doc.fastgpt.in/docs/course/quick-start/",
|
||||
"link":"https://doc.tryfastgpt.ai/docs/course/quick-start/",
|
||||
"datasetId":"6593e137231a2be9c5603ba7",
|
||||
"parentId": null,
|
||||
|
||||
@@ -718,7 +718,7 @@ curl --location --request POST 'http://localhost:3000/api/core/dataset/collectio
|
||||
"tmbId": "65422be6aa44b7da77729ec9",
|
||||
"type": "link",
|
||||
"name": "快速上手 | FastGPT",
|
||||
"rawLink": "https://doc.fastgpt.in/docs/course/quick-start/",
|
||||
"rawLink": "https://doc.tryfastgpt.ai/docs/course/quick-start/",
|
||||
"updateTime": "2024-01-20T13:54:53.031Z",
|
||||
"dataAmount": 3,
|
||||
"trainingAmount": 0,
|
||||
@@ -935,7 +935,7 @@ curl --location --request DELETE 'http://localhost:3000/api/core/dataset/collect
|
||||
{{< markdownify >}}
|
||||
|
||||
```bash
|
||||
curl --location --request POST 'https://api.fastgpt.in/api/core/dataset/data/pushData' \
|
||||
curl --location --request POST 'https://api.tryfastgpt.ai/api/core/dataset/data/pushData' \
|
||||
--header 'Authorization: Bearer apikey' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
@@ -1272,7 +1272,7 @@ curl --location --request DELETE 'http://localhost:3000/api/core/dataset/data/de
|
||||
{{< markdownify >}}
|
||||
|
||||
```bash
|
||||
curl --location --request POST 'https://api.fastgpt.in/api/core/dataset/searchTest' \
|
||||
curl --location --request POST 'https://api.tryfastgpt.ai/api/core/dataset/searchTest' \
|
||||
--header 'Authorization: Bearer fastgpt-xxxxx' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
|
@@ -53,9 +53,9 @@ weight: 860
|
||||
|
||||
在分享链接的地址中,增加一个额外的参数: authToken。例如:
|
||||
|
||||
原始的链接:`https://share.fastgpt.in/chat/share?shareId=648aaf5ae121349a16d62192`
|
||||
原始的链接:`https://share.tryfastgpt.ai/chat/share?shareId=648aaf5ae121349a16d62192`
|
||||
|
||||
完整链接: `https://share.fastgpt.in/chat/share?shareId=648aaf5ae121349a16d62192&authToken=userid12345`
|
||||
完整链接: `https://share.tryfastgpt.ai/chat/share?shareId=648aaf5ae121349a16d62192&authToken=userid12345`
|
||||
|
||||
这个`authToken`通常是你系统生成的用户唯一凭证(Token之类的)。FastGPT 会在鉴权接口的`body`中携带 token={{authToken}} 的参数。
|
||||
|
||||
@@ -387,9 +387,9 @@ export default async function (ctx: FunctionContext) {
|
||||
|
||||
### 3. 修改分享链接参数
|
||||
|
||||
源分享链接:`https://share.fastgpt.in/chat/share?shareId=64be36376a438af0311e599c`
|
||||
源分享链接:`https://share.tryfastgpt.ai/chat/share?shareId=64be36376a438af0311e599c`
|
||||
|
||||
修改后:`https://share.fastgpt.in/chat/share?shareId=64be36376a438af0311e599c&authToken=fastgpt`
|
||||
修改后:`https://share.tryfastgpt.ai/chat/share?shareId=64be36376a438af0311e599c&authToken=fastgpt`
|
||||
|
||||
### 4. 测试效果
|
||||
|
||||
|
@@ -89,7 +89,7 @@ FastGPT 商业版共包含了2个应用(fastgpt, fastgpt-plus)和2个数据
|
||||
点击右侧的详情,可以查看对应应用的详细信息。
|
||||
|
||||
### 如何更新/升级 FastGPT
|
||||
[升级脚本文档](https://doc.fastgpt.in/docs/development/upgrading/)先看下文档,看下需要升级哪个版本。注意,不要跨版本升级!!!!!
|
||||
[升级脚本文档](https://doc.tryfastgpt.ai/docs/development/upgrading/)先看下文档,看下需要升级哪个版本。注意,不要跨版本升级!!!!!
|
||||
|
||||
例如,目前是4.5 版本,要升级到4.5.1,就先把镜像版本改成v4.5.1,执行一下升级脚本,等待完成后再继续升级。如果目标版本不需要执行初始化,则可以跳过。
|
||||
|
||||
@@ -124,7 +124,7 @@ FastGPT 商业版共包含了2个应用(fastgpt, fastgpt-plus)和2个数据
|
||||
|
||||

|
||||
|
||||
[配置文件参考](https://doc.fastgpt.in/docs/development/configuration/)
|
||||
[配置文件参考](https://doc.tryfastgpt.ai/docs/development/configuration/)
|
||||
|
||||
### 修改站点名称以及 favicon
|
||||
修改应用的环境变量,增加
|
||||
|
Reference in New Issue
Block a user