Skip to content

Commit

Permalink
deploy: a5b913f
Browse files Browse the repository at this point in the history
  • Loading branch information
c121914yu committed Oct 27, 2024
1 parent 1dcf3f2 commit 4a84618
Show file tree
Hide file tree
Showing 7 changed files with 182 additions and 182 deletions.
20 changes: 10 additions & 10 deletions docs/development/docker/index.html

Large diffs are not rendered by default.

132 changes: 66 additions & 66 deletions docs/development/openapi/chat/index.html

Large diffs are not rendered by default.

162 changes: 81 additions & 81 deletions docs/development/openapi/dataset/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/development/openapi/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ curl --location --request POST 'https://api.fastgpt.in/api/v1/chat/compl
🤖
传入的model,temperature等参数字段均无效,这些字段由编排决定,不会根据 API 参数改变。
不会返回实际消耗Token值,如果需要,可以设置detail=true,并手动计算 responseData 里的tokens值。
请求 link 基础请求示例 图片/文件请求示例 参数说明 curl --location --request POST &amp;#39;http://localhost:3000/api/v1/chat/completions&amp;#39; \ --header &amp;#39;Authorization: Bearer fastgpt-xxxxxx&amp;#39; \ --header &amp;#39;Content-Type: application/json&amp;#39; \ --data-raw &amp;#39;{ &amp;#34;chatId&amp;#34;: &amp;#34;abcd&amp;#34;, &amp;#34;stream&amp;#34;: false, &amp;#34;detail&amp;#34;: false, &amp;#34;variables&amp;#34;: { &amp;#34;uid&amp;#34;: &amp;#34;asdfadsfasfd2323&amp;#34;, &amp;#34;name&amp;#34;: &amp;#34;张三&amp;#34; }, &amp;#34;messages&amp;#34;: [ { &amp;#34;role&amp;#34;: &amp;#34;user&amp;#34;, &amp;#34;content&amp;#34;: &amp;#34;导演是谁&amp;#34;, } ] }&amp;#39; 仅messages有部分区别,其他参数一致。 目前不支持上次文件,需上传到自己的对象存储中,获取对应的文件链接。 curl --location --request POST &amp;#39;http://localhost:3000/api/v1/chat/completions&amp;#39; \ --header &amp;#39;Authorization: Bearer fastgpt-xxxxxx&amp;#39; \ --header &amp;#39;Content-Type: application/json&amp;#39; \ --data-raw &amp;#39;{ &amp;#34;chatId&amp;#34;: &amp;#34;abcd&amp;#34;, &amp;#34;stream&amp;#34;: false, &amp;#34;messages&amp;#34;: [ { &amp;#34;role&amp;#34;: &amp;#34;user&amp;#34;, &amp;#34;content&amp;#34;: [ { &amp;#34;type&amp;#34;: &amp;#34;text&amp;#34;, &amp;#34;text&amp;#34;: &amp;#34;导演是谁&amp;#34; }, { &amp;#34;type&amp;#34;: &amp;#34;image_url&amp;#34;, &amp;#34;image_url&amp;#34;: { &amp;#34;url&amp;#34;: &amp;#34;图片链接&amp;#34; } }, { &amp;#34;type&amp;#34;: &amp;#34;file_url&amp;#34;, &amp;#34;name&amp;#34;: &amp;#34;文件名&amp;#34;, &amp;#34;url&amp;#34;: &amp;#34;文档链接,支持 txt md html word pdf ppt csv excel&amp;#34; } ] } ] }&amp;#39; info headers.</description></item><item><title>知识库接口</title><link>https://doc.tryfastgpt.ai/docs/development/openapi/dataset/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://doc.tryfastgpt.ai/docs/development/openapi/dataset/</guid><description>如何获取知识库ID(datasetId) 如何获取文件集合ID(collection_id) 创建训练订单 link 请求示例 响应示例 新例子
请求 link 基础请求示例 图片/文件请求示例 参数说明 curl --location --request POST &amp;#39;http://localhost:3000/api/v1/chat/completions&amp;#39; \ --header &amp;#39;Authorization: Bearer fastgpt-xxxxxx&amp;#39; \ --header &amp;#39;Content-Type: application/json&amp;#39; \ --data-raw &amp;#39;{ &amp;#34;chatId&amp;#34;: &amp;#34;abcd&amp;#34;, &amp;#34;stream&amp;#34;: false, &amp;#34;detail&amp;#34;: false, &amp;#34;variables&amp;#34;: { &amp;#34;uid&amp;#34;: &amp;#34;asdfadsfasfd2323&amp;#34;, &amp;#34;name&amp;#34;: &amp;#34;张三&amp;#34; }, &amp;#34;messages&amp;#34;: [ { &amp;#34;role&amp;#34;: &amp;#34;user&amp;#34;, &amp;#34;content&amp;#34;: &amp;#34;导演是谁&amp;#34; } ] }&amp;#39; 仅messages有部分区别,其他参数一致。 目前不支持上次文件,需上传到自己的对象存储中,获取对应的文件链接。 curl --location --request POST &amp;#39;http://localhost:3000/api/v1/chat/completions&amp;#39; \ --header &amp;#39;Authorization: Bearer fastgpt-xxxxxx&amp;#39; \ --header &amp;#39;Content-Type: application/json&amp;#39; \ --data-raw &amp;#39;{ &amp;#34;chatId&amp;#34;: &amp;#34;abcd&amp;#34;, &amp;#34;stream&amp;#34;: false, &amp;#34;messages&amp;#34;: [ { &amp;#34;role&amp;#34;: &amp;#34;user&amp;#34;, &amp;#34;content&amp;#34;: [ { &amp;#34;type&amp;#34;: &amp;#34;text&amp;#34;, &amp;#34;text&amp;#34;: &amp;#34;导演是谁&amp;#34; }, { &amp;#34;type&amp;#34;: &amp;#34;image_url&amp;#34;, &amp;#34;image_url&amp;#34;: { &amp;#34;url&amp;#34;: &amp;#34;图片链接&amp;#34; } }, { &amp;#34;type&amp;#34;: &amp;#34;file_url&amp;#34;, &amp;#34;name&amp;#34;: &amp;#34;文件名&amp;#34;, &amp;#34;url&amp;#34;: &amp;#34;文档链接,支持 txt md html word pdf ppt csv excel&amp;#34; } ] } ] }&amp;#39; info headers.</description></item><item><title>知识库接口</title><link>https://doc.tryfastgpt.ai/docs/development/openapi/dataset/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://doc.tryfastgpt.ai/docs/development/openapi/dataset/</guid><description>如何获取知识库ID(datasetId) 如何获取文件集合ID(collection_id) 创建训练订单 link 请求示例 响应示例 新例子
curl --location --request POST &amp;#39;http://localhost:3000/api/support/wallet/usage/createTrainingUsage&amp;#39; \ --header &amp;#39;Authorization: Bearer {{apikey}}&amp;#39; \ --header &amp;#39;Content-Type: application/json&amp;#39; \ --data-raw &amp;#39;{ &amp;#34;datasetId&amp;#34;: &amp;#34;知识库 ID&amp;#34;, &amp;#34;name&amp;#34;: &amp;#34;可选,自定义订单名称,例如:文档训练-fastgpt.docx&amp;#34; }&amp;#39; x例子
curl --location --request POST &amp;#39;http://localhost:3000/api/support/wallet/bill/createTrainingBill&amp;#39; \ --header &amp;#39;Authorization: Bearer {{apikey}}&amp;#39; \ --header &amp;#39;Content-Type: application/json&amp;#39; \ --data-raw &amp;#39;{ &amp;#34;name&amp;#34;: &amp;#34;可选,自定义订单名称,例如:文档训练-fastgpt.docx&amp;#34; }&amp;#39; data 为 billId,可用于添加知识库数据时进行账单聚合。
{ &amp;#34;code&amp;#34;: 200, &amp;#34;statusText&amp;#34;: &amp;#34;&amp;#34;, &amp;#34;message&amp;#34;: &amp;#34;&amp;#34;, &amp;#34;data&amp;#34;: &amp;#34;65112ab717c32018f4156361&amp;#34; } 知识库 link创建一个知识库 link 请求示例 参数说明 响应示例 curl --location --request POST &amp;#39;http://localhost:3000/api/core/dataset/create&amp;#39; \ --header &amp;#39;Authorization: Bearer {{authorization}}&amp;#39; \ --header &amp;#39;Content-Type: application/json&amp;#39; \ --data-raw &amp;#39;{ &amp;#34;parentId&amp;#34;: null, &amp;#34;type&amp;#34;: &amp;#34;dataset&amp;#34;, &amp;#34;name&amp;#34;:&amp;#34;测试&amp;#34;, &amp;#34;intro&amp;#34;:&amp;#34;介绍&amp;#34;, &amp;#34;avatar&amp;#34;: &amp;#34;&amp;#34;, &amp;#34;vectorModel&amp;#34;: &amp;#34;text-embedding-ada-002&amp;#34;, &amp;#34;agentModel&amp;#34;: &amp;#34;gpt-3.</description></item><item><title>分享链接身份鉴权</title><link>https://doc.tryfastgpt.ai/docs/development/openapi/share/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://doc.tryfastgpt.ai/docs/development/openapi/share/</guid><description>介绍 link在 FastGPT V4.6.4 中,我们修改了分享链接的数据读取方式,为每个用户生成一个 localId,用于标识用户,从云端拉取对话记录。但是这种方式仅能保障用户在同一设备同一浏览器中使用,如果切换设备或者清空浏览器缓存则会丢失这些记录。这种方式存在一定的风险,因此我们仅允许用户拉取近30天的20条记录。
Expand Down
Loading

0 comments on commit 4a84618

Please sign in to comment.