Commit 4f518390 by archer

perf: 参数值

parent 3c0fa30a
......@@ -16,6 +16,7 @@
"@alicloud/tea-util": "^1.4.5",
"@chakra-ui/icons": "^2.0.17",
"@chakra-ui/react": "^2.5.1",
"@chakra-ui/system": "^2.5.5",
"@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6",
"@next/font": "13.1.6",
......
......@@ -15,6 +15,16 @@ wx号: fastgpt123
4. 进入模型页,创建一个模型,建议直接用 ChatGPT。
5. 在模型列表点击【对话】,即可使用 API 进行聊天。
### 价格表
如果使用了自己的 Api Key,不会计费。可以在账号页,看到详细账单。单纯使用 chatGPT 模型进行对话,只有一个计费项目。使用知识库时,包含**对话**和**索引**生成两个计费项。
| 计费项 | 价格: 元/ 1K tokens(包含上下文)|
| --- | --- |
| chatgpt - 对话 | 0.03 |
| 知识库 - 对话 | 0.03 |
| 知识库 - 索引 | 0.004 |
| 文件拆分 | 0.03 |
### 定制 prompt
1. 进入模型编辑页
......@@ -29,12 +39,3 @@ wx号: fastgpt123
4. 使用该模型对话。
注意:使用知识库模型对话时,tokens 消耗会加快。
### 价格表
如果使用了自己的 Api Key,不会计费。可以在账号页,看到详细账单。单纯使用 chatGPT 模型进行对话,只有一个计费项目。使用知识库时,包含**对话**和**索引**生成两个计费项。
| 计费项 | 价格: 元/ 1K tokens(包含上下文)|
| --- | --- |
| chatgpt - 对话 | 0.03 |
| 知识库 - 对话 | 0.03 |
| 知识库 - 索引 | 0.004 |
| 文件拆分 | 0.03 |
......@@ -40,6 +40,9 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse<
// 去重
const searchRes = await Promise.allSettled(
data.map(async ([q, a]) => {
if (!q || !a) {
return Promise.reject('q/a为空');
}
try {
q = q.replace(/\\n/g, '\n');
a = a.replace(/\\n/g, '\n');
......
......@@ -88,7 +88,7 @@ const Chat = ({ chatId }: { chatId: string }) => {
throttle(() => {
if (!ChatBox.current) return;
const isBottom =
ChatBox.current.scrollTop + ChatBox.current.clientHeight + 50 >=
ChatBox.current.scrollTop + ChatBox.current.clientHeight + 80 >=
ChatBox.current.scrollHeight;
isBottom && scrollToBottom('auto');
......
......@@ -51,7 +51,7 @@ const NumberSetting = () => {
账号信息
</Box>
<Flex mt={6} alignItems={'center'}>
<Box flex={'0 0 60px'}>用户账号:</Box>
<Box flex={'0 0 60px'}>账号:</Box>
<Box>{userInfo?.username}</Box>
</Flex>
<Box mt={6}>
......
......@@ -11,4 +11,5 @@ export type ChatSiteItemType = {
export type HistoryItem = {
chatId: string;
title: string;
history?: ChatSiteItemType[];
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment