-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
56 changed files
with
868 additions
and
282 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
title: 'V4.4.6' | ||
description: 'FastGPT V4.4.6 更新' | ||
icon: 'upgrade' | ||
draft: false | ||
toc: true | ||
weight: 841 | ||
--- | ||
|
||
## 功能介绍 | ||
|
||
1. 高级编排新增模块 - 应用调用,可调用其他应用。 | ||
2. 新增 - 必要连接校验 | ||
3. 修复 - 下一步指引在免登录中身份问题。 |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import { ChatCompletionRequestMessage } from '../type'; | ||
import { getAIChatApi } from '../config'; | ||
|
||
export const Prompt_QuestionGuide = `我不太清楚问你什么问题,请帮我生成 3 个问题,引导我继续提问。问题的长度应小于20个字符,按 JSON 格式返回: ["问题1", "问题2", "问题3"]`; | ||
|
||
export async function createQuestionGuide({ | ||
messages, | ||
model | ||
}: { | ||
messages: ChatCompletionRequestMessage[]; | ||
model: string; | ||
}) { | ||
const chatAPI = getAIChatApi(); | ||
const { data } = await chatAPI.createChatCompletion({ | ||
model: model, | ||
temperature: 0, | ||
max_tokens: 200, | ||
messages: [ | ||
...messages, | ||
{ | ||
role: 'user', | ||
content: Prompt_QuestionGuide | ||
} | ||
], | ||
stream: false | ||
}); | ||
|
||
const answer = data.choices?.[0].message?.content || ''; | ||
const totalTokens = data.usage?.total_tokens || 0; | ||
|
||
const start = answer.indexOf('['); | ||
const end = answer.lastIndexOf(']'); | ||
|
||
if (start === -1 || end === -1) { | ||
return { | ||
result: [], | ||
tokens: totalTokens | ||
}; | ||
} | ||
|
||
const jsonStr = answer | ||
.substring(start, end + 1) | ||
.replace(/(\\n|\\)/g, '') | ||
.replace(/ /g, ''); | ||
|
||
try { | ||
return { | ||
result: JSON.parse(jsonStr), | ||
tokens: totalTokens | ||
}; | ||
} catch (error) { | ||
return { | ||
result: [], | ||
tokens: totalTokens | ||
}; | ||
} | ||
} |
File renamed without changes.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "app", | ||
"version": "4.4.5", | ||
"version": "4.4.6", | ||
"private": false, | ||
"scripts": { | ||
"dev": "next dev", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
### Fast GPT V4.4.5 | ||
### Fast GPT V4.4.6 | ||
|
||
1. 新增 - 下一步指引选项,可以通过模型生成 3 个预测问题。 | ||
2. 新增 - 分享链接 hook 身份校验。 | ||
3. 新增 - Api Key 使用。增加别名、额度限制和过期时间。自带 appId,无需额外连接。 | ||
4. 去除 - 限定词。目前旧应用仍生效,9/25 后全面去除,请及时替换。 | ||
5. 新增 - 引用模板/引用提示词设置,可以 DIY 引用内容的格式,从而更好的适配场景。[参考文档](https://doc.fastgpt.run/docs/use-cases/prompt/) | ||
6. [使用文档](https://doc.fastgpt.run/docs/intro/) | ||
7. [点击查看高级编排介绍文档](https://doc.fastgpt.run/docs/workflow) | ||
8. [点击查看商业版](https://doc.fastgpt.run/docs/commercial/) | ||
1. 高级编排新增模块 - 应用调用 | ||
2. 新增 - 必要连接校验 | ||
3. 新增 - 下一步指引选项,可以通过模型生成 3 个预测问题。 | ||
4. 新增 - 分享链接 hook 身份校验。 | ||
5. [使用文档](https://doc.fastgpt.run/docs/intro/) | ||
6. [点击查看高级编排介绍文档](https://doc.fastgpt.run/docs/workflow) | ||
7. [点击查看商业版](https://doc.fastgpt.run/docs/commercial/) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import { ChatCompletionRequestMessage } from '@fastgpt/core/aiApi/type'; | ||
import { ChatCompletionRequestMessage } from '@fastgpt/core/ai/type'; | ||
|
||
export type CreateQuestionGuideProps = { | ||
messages: ChatCompletionRequestMessage[]; | ||
shareId?: string; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.