mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-21 03:35:36 +00:00
perf: ery extension and fix filter same embedding result (#3833)
* perf: ery extension and fix filter same embedding result * fix: extract node too long * perf: ui * perf: not chatId will auto save * fix: laf * fix: member load * feat: add completions unstream error response * feat: add completions unstream error response * updat emodel provider
This commit is contained in:
@@ -7,6 +7,12 @@ toc: true
|
||||
weight: 852
|
||||
---
|
||||
|
||||
# 如何获取 AppId
|
||||
|
||||
可在应用详情的路径里获取 AppId。
|
||||
|
||||

|
||||
|
||||
# 发起对话
|
||||
|
||||
{{% alert icon="🤖 " context="success" %}}
|
||||
@@ -102,8 +108,8 @@ curl --location --request POST 'http://localhost:3000/api/v1/chat/completions' \
|
||||
{{% alert context="info" %}}
|
||||
- headers.Authorization: Bearer {{apikey}}
|
||||
- chatId: string | undefined 。
|
||||
- 为 `undefined` 时(不传入),不使用 FastGpt 提供的上下文功能,完全通过传入的 messages 构建上下文。 不会将你的记录存储到数据库中,你也无法在记录汇总中查阅到。
|
||||
- 为`非空字符串`时,意味着使用 chatId 进行对话,自动从 FastGpt 数据库取历史记录,并使用 messages 数组最后一个内容作为用户问题。请自行确保 chatId 唯一,长度小于250,通常可以是自己系统的对话框ID。
|
||||
- 为 `undefined` 时(不传入),不使用 FastGpt 提供的上下文功能,完全通过传入的 messages 构建上下文。
|
||||
- 为`非空字符串`时,意味着使用 chatId 进行对话,自动从 FastGpt 数据库取历史记录,并使用 messages 数组最后一个内容作为用户问题,其余 message 会被忽略。请自行确保 chatId 唯一,长度小于250,通常可以是自己系统的对话框ID。
|
||||
- messages: 结构与 [GPT接口](https://platform.openai.com/docs/api-reference/chat/object) chat模式一致。
|
||||
- responseChatItemId: string | undefined 。如果传入,则会将该值作为本次对话的响应消息的 ID,FastGPT 会自动将该 ID 存入数据库。请确保,在当前`chatId`下,`responseChatItemId`是唯一的。
|
||||
- detail: 是否返回中间值(模块状态,响应的完整结果等),`stream模式`下会通过`event`进行区分,`非stream模式`结果保存在`responseData`中。
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: 'Api Key 使用与鉴权'
|
||||
description: 'FastGPT Api Key 使用与鉴权'
|
||||
title: 'OpenAPI 介绍'
|
||||
description: 'FastGPT OpenAPI 介绍'
|
||||
icon: 'key'
|
||||
draft: false
|
||||
toc: true
|
||||
@@ -27,6 +27,7 @@ FastGPT 的 API Key **有 2 类**,一类是全局通用的 key (无法直接
|
||||
| --------------------- | --------------------- |
|
||||
|  |  |
|
||||
|
||||
|
||||
## 基本配置
|
||||
|
||||
OpenAPI 中,所有的接口都通过 Header.Authorization 进行鉴权。
|
@@ -17,19 +17,37 @@ weight: 802
|
||||
- 更新 fastgpt-pro 商业版镜像 tag: v4.8.22-alpha
|
||||
- Sandbox 镜像无需更新
|
||||
|
||||
### 3. 运行升级脚本
|
||||
|
||||
仅商业版,并提供 Saas 服务的用户需要运行该升级脚本。
|
||||
|
||||
从任意终端,发起 1 个 HTTP 请求。其中 {{rootkey}} 替换成环境变量里的 `rootkey`;{{host}} 替换成**FastGPT 域名**。
|
||||
|
||||
```bash
|
||||
curl --location --request POST 'https://{{host}}/api/admin/initv4822' \
|
||||
--header 'rootkey: {{rootkey}}' \
|
||||
--header 'Content-Type: application/json'
|
||||
```
|
||||
|
||||
会迁移联系方式到对应用户表中。
|
||||
|
||||
## 🚀 新增内容
|
||||
|
||||
1. AI 对话节点解析 `<think></think>` 标签内容作为思考链,便于各类模型进行思考链输出。需主动开启模型输出思考。
|
||||
2. ppio 模型提供商 by @saikidev
|
||||
2. 对话 API 优化,无论是否传递 chatId,都会保存对话日志。未传递 chatId,则随机生成一个 chatId 来进行存储。
|
||||
3. ppio 模型提供商 by
|
||||
|
||||
## ⚙️ 优化
|
||||
|
||||
1. 模型未配置时提示,减少冲突提示。
|
||||
1. 模型未配置时提示,减少冲突提示。
|
||||
2. 使用记录代码。
|
||||
3. 内容提取节点,字段描述过长时换行。同时修改其输出名用 key,而不是 description。
|
||||
4. 团队管理交互。
|
||||
5. 对话接口,非流响应,增加报错字段。
|
||||
|
||||
## 🐛 修复
|
||||
1. 思考内容未进入到输出 Tokens.
|
||||
|
||||
1. 思考内容未进入到输出 Tokens.
|
||||
2. 思考链流输出时,有时与正文顺序偏差。
|
||||
3. API 调用工作流,如果传递的图片不支持 Head 检测时,图片会被过滤。已增加该类错误检测,避免被错误过滤。
|
||||
4. 模板市场部分模板错误。
|
||||
@@ -37,4 +55,7 @@ weight: 802
|
||||
6. 对话日志导出,未兼容 sub path。
|
||||
7. 切换团队时未刷新成员列表
|
||||
8. list 接口在联查 member 时,存在空指针可能性。
|
||||
9. 工作流基础节点无法升级。
|
||||
9. 工作流基础节点无法升级。
|
||||
10. 向量检索结果未去重。
|
||||
11. 用户选择节点无法正常连线。
|
||||
12. 对话记录保存时,source 未正常记录。
|
Reference in New Issue
Block a user