mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 13:03:50 +00:00
Config file to set doc baseurl (#419)
This commit is contained in:
@@ -9,7 +9,8 @@ export type FeConfigsType = {
|
||||
show_openai_account?: boolean;
|
||||
show_promotion?: boolean;
|
||||
hide_app_flow?: boolean;
|
||||
openAPIUrl?: string;
|
||||
docUrl?: string;
|
||||
openAPIDocUrl?: string;
|
||||
systemTitle?: string;
|
||||
authorText?: string;
|
||||
googleClientVerKey?: string;
|
||||
|
@@ -174,7 +174,7 @@ const Navbar = ({ unread }: { unread: number }) => {
|
||||
mb={0}
|
||||
color={'#9096a5'}
|
||||
onClick={() => {
|
||||
window.open(`https://doc.fastgpt.run/docs/intro`);
|
||||
window.open(`${feConfigs.docUrl}/docs/intro`);
|
||||
}}
|
||||
>
|
||||
<MyIcon name={'courseLight'} width={'26px'} height={'26px'} />
|
||||
|
@@ -83,7 +83,7 @@ const ApiKeyTable = ({ tips, appId }: { tips: string; appId?: string }) => {
|
||||
API 秘钥管理
|
||||
</Box>
|
||||
<Link
|
||||
href={feConfigs.openAPIUrl || 'https://doc.fastgpt.run/docs/development/openapi'}
|
||||
href={feConfigs.openAPIDocUrl || 'https://doc.fastgpt.run/docs/development/openapi'}
|
||||
target={'_blank'}
|
||||
ml={1}
|
||||
color={'myBlue.600'}
|
||||
|
@@ -237,7 +237,7 @@ const UserInfo = () => {
|
||||
cursor={'pointer'}
|
||||
userSelect={'none'}
|
||||
onClick={() => {
|
||||
window.open(`https://doc.fastgpt.run/docs/intro`);
|
||||
window.open(`${feConfigs.docUrl}/docs/intro`);
|
||||
}}
|
||||
>
|
||||
<MyIcon name={'courseLight'} w={'18px'} />
|
||||
|
@@ -50,6 +50,8 @@ const defaultFeConfigs: FeConfigsType = {
|
||||
show_contact: true,
|
||||
show_git: true,
|
||||
show_doc: true,
|
||||
docUrl: 'https://docs.fastgpt.run',
|
||||
openAPIDocUrl: 'https://doc.fastgpt.run/docs/development/openapi',
|
||||
systemTitle: 'FastGPT',
|
||||
authorText: 'Made by FastGPT Team.',
|
||||
limit: {
|
||||
|
@@ -69,7 +69,7 @@ const AIChatSettingsModal = ({
|
||||
{t('app.AI Settings')}
|
||||
{feConfigs?.show_doc && (
|
||||
<Link
|
||||
href={'https://doc.fastgpt.run/docs/use-cases/ai_settings/'}
|
||||
href={`${feConfigs.docUrl}/docs/use-cases/ai_settings/`}
|
||||
target={'_blank'}
|
||||
ml={1}
|
||||
textDecoration={'underline'}
|
||||
|
@@ -353,7 +353,7 @@ function EditLinkModal({
|
||||
/>
|
||||
</Flex>
|
||||
<Link
|
||||
href="https://doc.fastgpt.run/docs/development/openapi/#分享链接中增加额外-query"
|
||||
href={`${feConfigs.docUrl}/docs/development/openapi/#分享链接中增加额外-query`}
|
||||
target={'_blank'}
|
||||
fontSize={'sm'}
|
||||
color={'myGray.500'}
|
||||
|
@@ -47,7 +47,7 @@ const Footer = () => {
|
||||
{
|
||||
label: t('home.Footer Docs'),
|
||||
onClick: () => {
|
||||
window.open('https://doc.fastgpt.run/docs/intro', '_blank');
|
||||
window.open(`${feConfigs.docUrl}/docs/intro`, '_blank');
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@@ -47,7 +47,7 @@ const Navbar = () => {
|
||||
label: t('home.Docs'),
|
||||
key: 'docs',
|
||||
onClick: () => {
|
||||
window.open('https://doc.fastgpt.run/docs/intro');
|
||||
window.open(`${feConfigs.docUrl}/docs/intro`);
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@@ -135,13 +135,16 @@ const FileSelect = ({
|
||||
filename: file.name,
|
||||
icon,
|
||||
tokens: filterData.reduce((sum, item) => sum + countPromptTokens(item.q), 0),
|
||||
text: '',
|
||||
text: `${header.join(',')}\n${data
|
||||
.map((item) => `"${item[0]}","${item[1]}"`)
|
||||
.join('\n')}`,
|
||||
chunks: filterData,
|
||||
type: DatasetCollectionTypeEnum.file,
|
||||
metadata: {
|
||||
fileId
|
||||
}
|
||||
};
|
||||
console.log(fileItem);
|
||||
|
||||
onPushFiles([fileItem]);
|
||||
continue;
|
||||
|
@@ -143,7 +143,7 @@ const LoginForm = ({ setPageType, loginSuccess }: Props) => {
|
||||
<Box textAlign={'center'} mt={2} fontSize={'sm'}>
|
||||
使用即代表你同意我们的{' '}
|
||||
<Link
|
||||
href="https://doc.fastgpt.run/docs/intro/#%e5%85%8d%e8%b4%a3%e5%a3%b0%e6%98%8e"
|
||||
href={`${feConfigs.docUrl}/docs/intro/#%e5%85%8d%e8%b4%a3%e5%a3%b0%e6%98%8e`}
|
||||
target={'_blank'}
|
||||
color={'myBlue.600'}
|
||||
>
|
||||
|
@@ -39,7 +39,7 @@ const Tools = () => {
|
||||
{
|
||||
icon: 'courseLight',
|
||||
label: '使用文档',
|
||||
link: 'https://doc.fastgpt.run/docs/intro'
|
||||
link: `${feConfigs.docUrl}/docs/intro`
|
||||
}
|
||||
]
|
||||
: [])
|
||||
|
Reference in New Issue
Block a user