diff --git a/public/docs/chatProblem.md b/public/docs/chatProblem.md index edbb5e31a4..29298ef371 100644 --- a/public/docs/chatProblem.md +++ b/public/docs/chatProblem.md @@ -2,13 +2,27 @@ **请求次数太多了** 一般是因为自己的 openai 账号异常。请先检查自己的账号是否正常使用。 + **内容长度** -chatgpt 上下文最长 4096 tokens, 会自动截取上下文,超过 4096 部分会被遗忘。 +不同模型上上限不一样,现在全设置为最大上限。 + **删除和复制** 电脑端:聊天内容右侧有复制和删除的图标。 移动端:点击对话头像,可以选择复制或删除该条内容。 + **代理出错** -服务器代理不稳定,可以过一会儿再尝试。 或者可以访问国外服务器: [FastGpt](https://fastgpt.run/) +服务器不稳定,可以过一会儿再尝试。 或者可以访问国外服务器: [FastGpt](https://fastgpt.run/) + +**价格表** +如果使用了自己的 Api Key,不会计费。可以在账号页,看到详细账单。 +| 计费项 | 价格: 元/ 1K tokens(包含上下文)| +| --- | --- | +| claude - 对话 | 免费 | +| chatgpt - 对话 | 0.03 | +| gpt4 - 对话 | 0.5 | +| 知识库 - 索引 | 免费 | +| 文件拆分 | 0.03 | + **其他问题** 请 WX 联系: fastgpt123 | 交流群 | 小助手 | diff --git a/src/components/Layout/auth.tsx b/src/components/Layout/auth.tsx index b36bcfd358..73e02d487b 100644 --- a/src/components/Layout/auth.tsx +++ b/src/components/Layout/auth.tsx @@ -7,7 +7,8 @@ import { useQuery } from '@tanstack/react-query'; const unAuthPage: { [key: string]: boolean } = { '/': true, '/login': true, - '/model/share': true + '/model/share': true, + '/chat/share': true }; const Auth = ({ children }: { children: JSX.Element }) => { diff --git a/src/pages/chat/index.tsx b/src/pages/chat/index.tsx index aefdc28b79..712cfe33af 100644 --- a/src/pages/chat/index.tsx +++ b/src/pages/chat/index.tsx @@ -77,7 +77,7 @@ const Chat = ({ chatId: string; isPcDevice: boolean; }) => { - const hasVoiceApi = !!window.speechSynthesis; + const hasVoiceApi = typeof window === 'undefined' ? false : !!window.speechSynthesis; const router = useRouter(); const theme = useTheme(); @@ -522,6 +522,8 @@ const Chat = ({ status: 'finish' })) }); + + // have records. if (res.history.length > 0) { setTimeout(() => { scrollToBottom('auto'); @@ -599,6 +601,7 @@ const Chat = ({ AiDetail?: boolean; }) => ( + onclickCopy(history.value)}>复制 {AiDetail && chatData.model.canUse && history.obj === 'AI' && ( )} - onclickCopy(history.value)}>复制 {hasVoiceApi && ( { - const hasVoiceApi = !!window.speechSynthesis; + const hasVoiceApi = typeof window === 'undefined' ? false : !!window.speechSynthesis; const router = useRouter(); const theme = useTheme(); @@ -454,16 +454,19 @@ const Chat = ({ password }); + const history = shareChatHistory.find((item) => item._id === historyId)?.chats || []; + setShareChatData({ ...res, - history: shareChatHistory.find((item) => item._id === historyId)?.chats || [] + history }); onClosePassword(); - setTimeout(() => { - scrollToBottom(); - }, 500); + history.length > 0 && + setTimeout(() => { + scrollToBottom(); + }, 500); } catch (e: any) { toast({ status: 'error', @@ -690,7 +693,7 @@ const Chat = ({ className="avatar" src={ item.obj === 'Human' - ? userInfo?.avatar + ? userInfo?.avatar || '/icon/human.png' : shareChatData.model.avatar || LOGO_ICON } alt="avatar"