update package;fix: input data model ui (#4181)
* update package * fix: ts * update config * update jieba package * add type sign * fix: input data ui
This commit is contained in:
parent
713d1901bf
commit
cf50f9ec4d
@ -20,9 +20,9 @@
|
|||||||
"@chakra-ui/cli": "^2.4.1",
|
"@chakra-ui/cli": "^2.4.1",
|
||||||
"@vitest/coverage-v8": "^3.0.2",
|
"@vitest/coverage-v8": "^3.0.2",
|
||||||
"husky": "^8.0.3",
|
"husky": "^8.0.3",
|
||||||
"i18next": "23.11.5",
|
"i18next": "23.16.8",
|
||||||
"lint-staged": "^13.3.0",
|
"lint-staged": "^13.3.0",
|
||||||
"next-i18next": "15.3.0",
|
"next-i18next": "15.4.2",
|
||||||
"prettier": "3.2.4",
|
"prettier": "3.2.4",
|
||||||
"react-i18next": "14.1.2",
|
"react-i18next": "14.1.2",
|
||||||
"vitest": "^3.0.2",
|
"vitest": "^3.0.2",
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"jschardet": "3.1.1",
|
"jschardet": "3.1.1",
|
||||||
"nanoid": "^5.1.3",
|
"nanoid": "^5.1.3",
|
||||||
"next": "14.2.21",
|
"next": "14.2.24",
|
||||||
"openai": "4.61.0",
|
"openai": "4.61.0",
|
||||||
"openapi-types": "^12.1.3",
|
"openapi-types": "^12.1.3",
|
||||||
"json5": "^2.2.3",
|
"json5": "^2.2.3",
|
||||||
|
|||||||
@ -1,4 +1,13 @@
|
|||||||
import { cut } from '@node-rs/jieba';
|
import { Jieba } from '@node-rs/jieba';
|
||||||
|
import fs from 'fs';
|
||||||
|
import path from 'path';
|
||||||
|
|
||||||
|
// 使用 require.resolve 获取包的路径,然后拼接字典文件路径
|
||||||
|
const jiebaPath = path.dirname(require.resolve('@node-rs/jieba/package.json'));
|
||||||
|
const dictPath = path.join(jiebaPath, 'dict.txt');
|
||||||
|
|
||||||
|
// 使用正确的文件路径加载字典
|
||||||
|
const jieba = Jieba.withDict(fs.readFileSync(dictPath));
|
||||||
|
|
||||||
const stopWords = new Set([
|
const stopWords = new Set([
|
||||||
'--',
|
'--',
|
||||||
@ -1509,8 +1518,8 @@ const stopWords = new Set([
|
|||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
|
|
||||||
export function jiebaSplit({ text }: { text: string }) {
|
export async function jiebaSplit({ text }: { text: string }) {
|
||||||
const tokens = cut(text, true);
|
const tokens = (await jieba.cutAsync(text, true)) as string[];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
tokens
|
tokens
|
||||||
|
|||||||
@ -537,7 +537,7 @@ export async function searchDatasetData(
|
|||||||
$match: {
|
$match: {
|
||||||
teamId: new Types.ObjectId(teamId),
|
teamId: new Types.ObjectId(teamId),
|
||||||
datasetId: new Types.ObjectId(id),
|
datasetId: new Types.ObjectId(id),
|
||||||
$text: { $search: jiebaSplit({ text: query }) },
|
$text: { $search: await jiebaSplit({ text: query }) },
|
||||||
...(filterCollectionIdList
|
...(filterCollectionIdList
|
||||||
? {
|
? {
|
||||||
collectionId: {
|
collectionId: {
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fastgpt/global": "workspace:*",
|
"@fastgpt/global": "workspace:*",
|
||||||
"@node-rs/jieba": "1.10.0",
|
"@node-rs/jieba": "2.0.1",
|
||||||
"@xmldom/xmldom": "^0.8.10",
|
"@xmldom/xmldom": "^0.8.10",
|
||||||
"@zilliz/milvus2-sdk-node": "2.4.2",
|
"@zilliz/milvus2-sdk-node": "2.4.2",
|
||||||
"axios": "^1.8.2",
|
"axios": "^1.8.2",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
"mammoth": "^1.6.0",
|
"mammoth": "^1.6.0",
|
||||||
"mongoose": "^8.10.1",
|
"mongoose": "^8.10.1",
|
||||||
"multer": "1.4.5-lts.1",
|
"multer": "1.4.5-lts.1",
|
||||||
"next": "14.2.21",
|
"next": "14.2.24",
|
||||||
"nextjs-cors": "^2.2.0",
|
"nextjs-cors": "^2.2.0",
|
||||||
"node-cron": "^3.0.3",
|
"node-cron": "^3.0.3",
|
||||||
"node-xlsx": "^0.24.0",
|
"node-xlsx": "^0.24.0",
|
||||||
|
|||||||
@ -4,8 +4,8 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@chakra-ui/anatomy": "2.2.1",
|
"@chakra-ui/anatomy": "2.2.1",
|
||||||
"@chakra-ui/icons": "2.1.1",
|
"@chakra-ui/icons": "2.1.1",
|
||||||
"@chakra-ui/next-js": "2.1.5",
|
"@chakra-ui/next-js": "2.4.2",
|
||||||
"@chakra-ui/react": "2.8.1",
|
"@chakra-ui/react": "2.10.7",
|
||||||
"@chakra-ui/styled-system": "2.9.1",
|
"@chakra-ui/styled-system": "2.9.1",
|
||||||
"@chakra-ui/system": "2.6.1",
|
"@chakra-ui/system": "2.6.1",
|
||||||
"@emotion/react": "11.11.1",
|
"@emotion/react": "11.11.1",
|
||||||
@ -21,11 +21,11 @@
|
|||||||
"ahooks": "^3.7.11",
|
"ahooks": "^3.7.11",
|
||||||
"date-fns": "2.30.0",
|
"date-fns": "2.30.0",
|
||||||
"dayjs": "^1.11.7",
|
"dayjs": "^1.11.7",
|
||||||
"i18next": "23.11.5",
|
"i18next": "23.16.8",
|
||||||
"js-cookie": "^3.0.5",
|
"js-cookie": "^3.0.5",
|
||||||
"lexical": "0.12.6",
|
"lexical": "0.12.6",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"next-i18next": "15.3.0",
|
"next-i18next": "15.4.2",
|
||||||
"papaparse": "^5.4.1",
|
"papaparse": "^5.4.1",
|
||||||
"react": "18.3.1",
|
"react": "18.3.1",
|
||||||
"react-beautiful-dnd": "^13.1.1",
|
"react-beautiful-dnd": "^13.1.1",
|
||||||
|
|||||||
10257
pnpm-lock.yaml
generated
10257
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,3 @@
|
|||||||
//next-i18next.config.js
|
|
||||||
/**
|
/**
|
||||||
* @type {import('next-i18next').UserConfig}
|
* @type {import('next-i18next').UserConfig}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
const { i18n } = require('./next-i18next.config');
|
const { i18n } = require('./next-i18next.config.js');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
|
||||||
@ -30,10 +30,6 @@ const nextConfig = {
|
|||||||
test: /\.svg$/i,
|
test: /\.svg$/i,
|
||||||
issuer: /\.[jt]sx?$/,
|
issuer: /\.[jt]sx?$/,
|
||||||
use: ['@svgr/webpack']
|
use: ['@svgr/webpack']
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.node$/,
|
|
||||||
use: [{ loader: 'nextjs-node-loader' }]
|
|
||||||
}
|
}
|
||||||
]),
|
]),
|
||||||
exprContextCritical: false,
|
exprContextCritical: false,
|
||||||
@ -43,6 +39,7 @@ const nextConfig = {
|
|||||||
if (!config.externals) {
|
if (!config.externals) {
|
||||||
config.externals = [];
|
config.externals = [];
|
||||||
}
|
}
|
||||||
|
config.externals.push('@node-rs/jieba');
|
||||||
|
|
||||||
if (isServer) {
|
if (isServer) {
|
||||||
if (nextRuntime === 'nodejs') {
|
if (nextRuntime === 'nodejs') {
|
||||||
@ -79,14 +76,15 @@ const nextConfig = {
|
|||||||
|
|
||||||
return config;
|
return config;
|
||||||
},
|
},
|
||||||
transpilePackages: ['@fastgpt/*', 'ahooks'],
|
// 需要转译的包
|
||||||
|
transpilePackages: ['@fastgpt/global', '@fastgpt/web', 'ahooks'],
|
||||||
experimental: {
|
experimental: {
|
||||||
// 优化 Server Components 的构建和运行,避免不必要的客户端打包。
|
// 优化 Server Components 的构建和运行,避免不必要的客户端打包。
|
||||||
serverComponentsExternalPackages: [
|
serverComponentsExternalPackages: [
|
||||||
'mongoose',
|
'mongoose',
|
||||||
'pg',
|
'pg',
|
||||||
'@node-rs/jieba',
|
'@zilliz/milvus2-sdk-node',
|
||||||
'@zilliz/milvus2-sdk-node'
|
"tiktoken"
|
||||||
],
|
],
|
||||||
outputFileTracingRoot: path.join(__dirname, '../../'),
|
outputFileTracingRoot: path.join(__dirname, '../../'),
|
||||||
instrumentationHook: true
|
instrumentationHook: true
|
||||||
|
|||||||
@ -11,8 +11,8 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@chakra-ui/anatomy": "2.2.1",
|
"@chakra-ui/anatomy": "2.2.1",
|
||||||
"@chakra-ui/icons": "2.1.1",
|
"@chakra-ui/icons": "2.1.1",
|
||||||
"@chakra-ui/next-js": "2.1.5",
|
"@chakra-ui/next-js": "2.4.2",
|
||||||
"@chakra-ui/react": "2.8.1",
|
"@chakra-ui/react": "2.10.7",
|
||||||
"@chakra-ui/styled-system": "2.9.1",
|
"@chakra-ui/styled-system": "2.9.1",
|
||||||
"@chakra-ui/system": "2.6.1",
|
"@chakra-ui/system": "2.6.1",
|
||||||
"@emotion/react": "11.11.1",
|
"@emotion/react": "11.11.1",
|
||||||
@ -23,9 +23,7 @@
|
|||||||
"@fastgpt/templates": "workspace:*",
|
"@fastgpt/templates": "workspace:*",
|
||||||
"@fastgpt/web": "workspace:*",
|
"@fastgpt/web": "workspace:*",
|
||||||
"@fortaine/fetch-event-source": "^3.0.6",
|
"@fortaine/fetch-event-source": "^3.0.6",
|
||||||
"@node-rs/jieba": "1.10.0",
|
|
||||||
"@tanstack/react-query": "^4.24.10",
|
"@tanstack/react-query": "^4.24.10",
|
||||||
"@types/nprogress": "^0.2.0",
|
|
||||||
"ahooks": "^3.7.11",
|
"ahooks": "^3.7.11",
|
||||||
"axios": "^1.8.2",
|
"axios": "^1.8.2",
|
||||||
"date-fns": "2.30.0",
|
"date-fns": "2.30.0",
|
||||||
@ -35,7 +33,7 @@
|
|||||||
"formidable": "^2.1.1",
|
"formidable": "^2.1.1",
|
||||||
"framer-motion": "9.1.7",
|
"framer-motion": "9.1.7",
|
||||||
"hyperdown": "^2.4.29",
|
"hyperdown": "^2.4.29",
|
||||||
"i18next": "23.11.5",
|
"i18next": "23.16.8",
|
||||||
"immer": "^9.0.19",
|
"immer": "^9.0.19",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"json5": "^2.2.3",
|
"json5": "^2.2.3",
|
||||||
@ -44,9 +42,8 @@
|
|||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"mermaid": "^10.2.3",
|
"mermaid": "^10.2.3",
|
||||||
"nanoid": "^5.1.3",
|
"nanoid": "^5.1.3",
|
||||||
"next": "14.2.21",
|
"next": "14.2.24",
|
||||||
"next-i18next": "15.3.0",
|
"next-i18next": "15.4.2",
|
||||||
"nextjs-node-loader": "^1.1.5",
|
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"qrcode": "^1.5.4",
|
"qrcode": "^1.5.4",
|
||||||
"react": "18.3.1",
|
"react": "18.3.1",
|
||||||
@ -76,6 +73,7 @@
|
|||||||
"@types/jsonwebtoken": "^9.0.3",
|
"@types/jsonwebtoken": "^9.0.3",
|
||||||
"@types/lodash": "^4.14.191",
|
"@types/lodash": "^4.14.191",
|
||||||
"@types/node": "^20.14.2",
|
"@types/node": "^20.14.2",
|
||||||
|
"@types/nprogress": "^0.2.0",
|
||||||
"@types/qrcode": "^1.5.5",
|
"@types/qrcode": "^1.5.5",
|
||||||
"@types/react": "18.3.1",
|
"@types/react": "18.3.1",
|
||||||
"@types/react-dom": "18.3.0",
|
"@types/react-dom": "18.3.0",
|
||||||
@ -83,7 +81,6 @@
|
|||||||
"@types/request-ip": "^0.0.37",
|
"@types/request-ip": "^0.0.37",
|
||||||
"eslint": "8.56.0",
|
"eslint": "8.56.0",
|
||||||
"eslint-config-next": "14.2.24",
|
"eslint-config-next": "14.2.24",
|
||||||
"nextjs-node-loader": "^1.1.5",
|
|
||||||
"typescript": "^5.1.3",
|
"typescript": "^5.1.3",
|
||||||
"vitest": "^3.0.2"
|
"vitest": "^3.0.2"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -220,13 +220,7 @@ function BillDetailModal({ bill, onClose }: { bill: BillSchemaType; onClose: ()
|
|||||||
{bill.metadata.payWay === 'balance' ? (
|
{bill.metadata.payWay === 'balance' ? (
|
||||||
t('user:bill.not_need_invoice')
|
t('user:bill.not_need_invoice')
|
||||||
) : (
|
) : (
|
||||||
<Box>
|
<Box>{bill.hasInvoice ? t('account_bill:yes') : t('account_bill:no')}</Box>
|
||||||
{
|
|
||||||
(bill.metadata.payWay = bill.hasInvoice
|
|
||||||
? t('account_bill:yes')
|
|
||||||
: t('account_bill:no'))
|
|
||||||
}
|
|
||||||
</Box>
|
|
||||||
)}
|
)}
|
||||||
</Flex>
|
</Flex>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@ -17,7 +17,6 @@ import { getSourceNameIcon } from '@fastgpt/global/core/dataset/utils';
|
|||||||
import { DatasetDataIndexItemType } from '@fastgpt/global/core/dataset/type';
|
import { DatasetDataIndexItemType } from '@fastgpt/global/core/dataset/type';
|
||||||
import DeleteIcon from '@fastgpt/web/components/common/Icon/delete';
|
import DeleteIcon from '@fastgpt/web/components/common/Icon/delete';
|
||||||
import { defaultCollectionDetail } from '@/web/core/dataset/constants';
|
import { defaultCollectionDetail } from '@/web/core/dataset/constants';
|
||||||
import { getDocPath } from '@/web/common/system/doc';
|
|
||||||
import MyBox from '@fastgpt/web/components/common/MyBox';
|
import MyBox from '@fastgpt/web/components/common/MyBox';
|
||||||
import { getErrText } from '@fastgpt/global/common/error/utils';
|
import { getErrText } from '@fastgpt/global/common/error/utils';
|
||||||
import { useSystemStore } from '@/web/common/system/useSystemStore';
|
import { useSystemStore } from '@/web/common/system/useSystemStore';
|
||||||
@ -257,16 +256,18 @@ const InputDataModal = ({
|
|||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Flex
|
<Flex flex={'1 0 0'} h={['auto', '0']} gap={6} flexDir={['column', 'row']} px={[5, '0']}>
|
||||||
pt={4}
|
|
||||||
flex={'1 0 0'}
|
|
||||||
gap={6}
|
|
||||||
flexDir={['column', 'row']}
|
|
||||||
overflow={'auto'}
|
|
||||||
px={[5, '3.25rem']}
|
|
||||||
>
|
|
||||||
{/* Data */}
|
{/* Data */}
|
||||||
<Flex flexDir={'column'} h={'100%'} gap={3} flex={'1 0 0'}>
|
<Flex
|
||||||
|
pt={4}
|
||||||
|
pl={[0, '3.25rem']}
|
||||||
|
flexDir={'column'}
|
||||||
|
h={'100%'}
|
||||||
|
gap={3}
|
||||||
|
flex={'1 0 0'}
|
||||||
|
w={['100%', 0]}
|
||||||
|
overflow={['unset', 'auto']}
|
||||||
|
>
|
||||||
<Flex flexDir={'column'} h={'100%'}>
|
<Flex flexDir={'column'} h={'100%'}>
|
||||||
<FormLabel required mb={1} h={'30px'}>
|
<FormLabel required mb={1} h={'30px'}>
|
||||||
{currentTab === TabEnum.chunk
|
{currentTab === TabEnum.chunk
|
||||||
@ -315,7 +316,13 @@ const InputDataModal = ({
|
|||||||
)}
|
)}
|
||||||
</Flex>
|
</Flex>
|
||||||
{/* Index */}
|
{/* Index */}
|
||||||
<Box flex={'1 0 0'}>
|
<Box
|
||||||
|
pt={4}
|
||||||
|
pr={[0, '3.25rem']}
|
||||||
|
flex={'1 0 0'}
|
||||||
|
w={['100%', 0]}
|
||||||
|
overflow={['unset', 'auto']}
|
||||||
|
>
|
||||||
<Flex alignItems={'flex-start'} justifyContent={'space-between'} h={'30px'}>
|
<Flex alignItems={'flex-start'} justifyContent={'space-between'} h={'30px'}>
|
||||||
<FormLabel>
|
<FormLabel>
|
||||||
{t('common:dataset.data.edit.Index', {
|
{t('common:dataset.data.edit.Index', {
|
||||||
|
|||||||
@ -44,7 +44,7 @@ const restore = async () => {
|
|||||||
const data = await MongoDatasetData.findOne({ fullTextToken: { $exists: false } });
|
const data = await MongoDatasetData.findOne({ fullTextToken: { $exists: false } });
|
||||||
if (!data) return;
|
if (!data) return;
|
||||||
|
|
||||||
data.fullTextToken = jiebaSplit({ text: `${data.q}\n${data.a}`.trim() });
|
data.fullTextToken = await jiebaSplit({ text: `${data.q}\n${data.a}`.trim() });
|
||||||
await data.save();
|
await data.save();
|
||||||
|
|
||||||
success++;
|
success++;
|
||||||
|
|||||||
@ -138,7 +138,7 @@ export async function insertData2Dataset({
|
|||||||
datasetId,
|
datasetId,
|
||||||
collectionId,
|
collectionId,
|
||||||
dataId: _id,
|
dataId: _id,
|
||||||
fullTextToken: jiebaSplit({ text: `${q}\n${a}`.trim() })
|
fullTextToken: await jiebaSplit({ text: `${q}\n${a}`.trim() })
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
{ session, ordered: true }
|
{ session, ordered: true }
|
||||||
@ -272,7 +272,7 @@ export async function updateData2Dataset({
|
|||||||
// update mongo data text
|
// update mongo data text
|
||||||
await MongoDatasetDataText.updateOne(
|
await MongoDatasetDataText.updateOne(
|
||||||
{ dataId: mongoData._id },
|
{ dataId: mongoData._id },
|
||||||
{ fullTextToken: jiebaSplit({ text: `${mongoData.q}\n${mongoData.a}`.trim() }) },
|
{ fullTextToken: await jiebaSplit({ text: `${mongoData.q}\n${mongoData.a}`.trim() }) },
|
||||||
{ session }
|
{ session }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
import { GET, POST, DELETE, PUT } from '@/web/common/api/request';
|
import { GET, POST, DELETE, PUT } from '@/web/common/api/request';
|
||||||
import type { AppDetailType, AppListItemType } from '@fastgpt/global/core/app/type.d';
|
import type { AppDetailType, AppListItemType } from '@fastgpt/global/core/app/type.d';
|
||||||
import type { GetAppChatLogsParams } from '@/global/core/api/appReq.d';
|
import type { GetAppChatLogsParams } from '@/global/core/api/appReq.d';
|
||||||
import { AppUpdateParams, AppChangeOwnerBody } from '@/global/core/app/api';
|
import type { AppUpdateParams, AppChangeOwnerBody } from '@/global/core/app/api';
|
||||||
import type { CreateAppBody } from '@/pages/api/core/app/create';
|
import type { CreateAppBody } from '@/pages/api/core/app/create';
|
||||||
import type { ListAppBody } from '@/pages/api/core/app/list';
|
import type { ListAppBody } from '@/pages/api/core/app/list';
|
||||||
import { AppLogsListItemType } from '@/types/app';
|
import type { AppLogsListItemType } from '@/types/app';
|
||||||
import { PaginationResponse } from '@fastgpt/web/common/fetch/type';
|
import type { PaginationResponse } from '@fastgpt/web/common/fetch/type';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取应用列表
|
* 获取应用列表
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { DELETE, GET, POST } from '@/web/common/api/request';
|
import { DELETE, GET, POST } from '@/web/common/api/request';
|
||||||
import type { CreateAppFolderBody } from '@/pages/api/core/app/folder/create';
|
import type { CreateAppFolderBody } from '@/pages/api/core/app/folder/create';
|
||||||
import { ParentTreePathItemType } from '@fastgpt/global/common/parentFolder/type';
|
import type { ParentTreePathItemType } from '@fastgpt/global/common/parentFolder/type';
|
||||||
import { ParentIdType } from '@fastgpt/global/common/parentFolder/type';
|
import type { ParentIdType } from '@fastgpt/global/common/parentFolder/type';
|
||||||
import type {
|
import type {
|
||||||
transitionWorkflowBody,
|
transitionWorkflowBody,
|
||||||
transitionWorkflowResponse
|
transitionWorkflowResponse
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
import {
|
import type {
|
||||||
UpdateAppCollaboratorBody,
|
UpdateAppCollaboratorBody,
|
||||||
AppCollaboratorDeleteParams
|
AppCollaboratorDeleteParams
|
||||||
} from '@fastgpt/global/core/app/collaborator';
|
} from '@fastgpt/global/core/app/collaborator';
|
||||||
import { DELETE, GET, POST } from '@/web/common/api/request';
|
import { DELETE, GET, POST } from '@/web/common/api/request';
|
||||||
import { CollaboratorItemType } from '@fastgpt/global/support/permission/collaborator';
|
import type { CollaboratorItemType } from '@fastgpt/global/support/permission/collaborator';
|
||||||
|
|
||||||
export const getCollaboratorList = (appId: string) =>
|
export const getCollaboratorList = (appId: string) =>
|
||||||
GET<CollaboratorItemType[]>('/proApi/core/app/collaborator/list', { appId });
|
GET<CollaboratorItemType[]>('/proApi/core/app/collaborator/list', { appId });
|
||||||
|
|||||||
@ -11,9 +11,12 @@ import { defaultNodeVersion, FlowNodeTypeEnum } from '@fastgpt/global/core/workf
|
|||||||
import { FlowNodeTemplateTypeEnum } from '@fastgpt/global/core/workflow/constants';
|
import { FlowNodeTemplateTypeEnum } from '@fastgpt/global/core/workflow/constants';
|
||||||
import type { GetPreviewNodeQuery } from '@/pages/api/core/app/plugin/getPreviewNode';
|
import type { GetPreviewNodeQuery } from '@/pages/api/core/app/plugin/getPreviewNode';
|
||||||
import { AppTypeEnum } from '@fastgpt/global/core/app/constants';
|
import { AppTypeEnum } from '@fastgpt/global/core/app/constants';
|
||||||
import { ParentIdType, ParentTreePathItemType } from '@fastgpt/global/common/parentFolder/type';
|
import type {
|
||||||
import { GetSystemPluginTemplatesBody } from '@/pages/api/core/app/plugin/getSystemPluginTemplates';
|
ParentIdType,
|
||||||
import { PluginGroupSchemaType } from '@fastgpt/service/core/app/plugin/type';
|
ParentTreePathItemType
|
||||||
|
} from '@fastgpt/global/common/parentFolder/type';
|
||||||
|
import type { GetSystemPluginTemplatesBody } from '@/pages/api/core/app/plugin/getSystemPluginTemplates';
|
||||||
|
import type { PluginGroupSchemaType } from '@fastgpt/service/core/app/plugin/type';
|
||||||
import { useSystemStore } from '@/web/common/system/useSystemStore';
|
import { useSystemStore } from '@/web/common/system/useSystemStore';
|
||||||
import { defaultGroup } from '@fastgpt/web/core/workflow/constants';
|
import { defaultGroup } from '@fastgpt/web/core/workflow/constants';
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { ListParams } from '@/pages/api/core/app/template/list';
|
import type { ListParams } from '@/pages/api/core/app/template/list';
|
||||||
import { GET } from '@/web/common/api/request';
|
import { GET } from '@/web/common/api/request';
|
||||||
import { useSystemStore } from '@/web/common/system/useSystemStore';
|
import { useSystemStore } from '@/web/common/system/useSystemStore';
|
||||||
import { AppTemplateSchemaType, TemplateTypeSchemaType } from '@fastgpt/global/core/app/type';
|
import type { AppTemplateSchemaType, TemplateTypeSchemaType } from '@fastgpt/global/core/app/type';
|
||||||
import { defaultTemplateTypes } from '@fastgpt/web/core/workflow/constants';
|
import { defaultTemplateTypes } from '@fastgpt/web/core/workflow/constants';
|
||||||
|
|
||||||
export const getTemplateMarketItemList = (data: ListParams) =>
|
export const getTemplateMarketItemList = (data: ListParams) =>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { PostPublishAppProps } from '@/global/core/app/api';
|
import type { PostPublishAppProps } from '@/global/core/app/api';
|
||||||
import { GET, POST } from '@/web/common/api/request';
|
import { GET, POST } from '@/web/common/api/request';
|
||||||
import type { AppVersionSchemaType } from '@fastgpt/global/core/app/version';
|
import type { AppVersionSchemaType } from '@fastgpt/global/core/app/version';
|
||||||
import { PaginationProps } from '@fastgpt/web/common/fetch/type';
|
import type { PaginationProps } from '@fastgpt/web/common/fetch/type';
|
||||||
import type {
|
import type {
|
||||||
getLatestVersionQuery,
|
getLatestVersionQuery,
|
||||||
getLatestVersionResponse
|
getLatestVersionResponse
|
||||||
|
|||||||
@ -17,7 +17,7 @@ import type {
|
|||||||
QueryChatInputGuideBody,
|
QueryChatInputGuideBody,
|
||||||
QueryChatInputGuideResponse
|
QueryChatInputGuideResponse
|
||||||
} from '@/pages/api/core/chat/inputGuide/query';
|
} from '@/pages/api/core/chat/inputGuide/query';
|
||||||
import { deleteAllInputGuideBody } from '@/pages/api/core/chat/inputGuide/deleteAll';
|
import type { deleteAllInputGuideBody } from '@/pages/api/core/chat/inputGuide/deleteAll';
|
||||||
|
|
||||||
export const getCountChatInputGuideTotal = (data: countChatInputGuideTotalQuery) =>
|
export const getCountChatInputGuideTotal = (data: countChatInputGuideTotalQuery) =>
|
||||||
GET<countChatInputGuideTotalResponse>(`/core/chat/inputGuide/countTotal`, data);
|
GET<countChatInputGuideTotalResponse>(`/core/chat/inputGuide/countTotal`, data);
|
||||||
|
|||||||
@ -64,8 +64,8 @@ import type {
|
|||||||
listExistIdQuery,
|
listExistIdQuery,
|
||||||
listExistIdResponse
|
listExistIdResponse
|
||||||
} from '@/pages/api/core/dataset/apiDataset/listExistId';
|
} from '@/pages/api/core/dataset/apiDataset/listExistId';
|
||||||
import { GetQuoteDataResponse } from '@/pages/api/core/dataset/data/getQuoteData';
|
import type { GetQuoteDataResponse } from '@/pages/api/core/dataset/data/getQuoteData';
|
||||||
import { GetQuotePermissionResponse } from '@/pages/api/core/dataset/data/getPermission';
|
import type { GetQuotePermissionResponse } from '@/pages/api/core/dataset/data/getPermission';
|
||||||
|
|
||||||
/* ======================== dataset ======================= */
|
/* ======================== dataset ======================= */
|
||||||
export const getDatasets = (data: GetDatasetListBody) =>
|
export const getDatasets = (data: GetDatasetListBody) =>
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
import {
|
import type {
|
||||||
UpdateDatasetCollaboratorBody,
|
UpdateDatasetCollaboratorBody,
|
||||||
DatasetCollaboratorDeleteParams
|
DatasetCollaboratorDeleteParams
|
||||||
} from '@fastgpt/global/core/dataset/collaborator';
|
} from '@fastgpt/global/core/dataset/collaborator';
|
||||||
import { DELETE, GET, POST } from '@/web/common/api/request';
|
import { DELETE, GET, POST } from '@/web/common/api/request';
|
||||||
import { CollaboratorItemType } from '@fastgpt/global/support/permission/collaborator';
|
import type { CollaboratorItemType } from '@fastgpt/global/support/permission/collaborator';
|
||||||
|
|
||||||
export const getCollaboratorList = (datasetId: string) =>
|
export const getCollaboratorList = (datasetId: string) =>
|
||||||
GET<CollaboratorItemType[]>('/proApi/core/dataset/collaborator/list', { datasetId });
|
GET<CollaboratorItemType[]>('/proApi/core/dataset/collaborator/list', { datasetId });
|
||||||
|
|||||||
@ -10,20 +10,20 @@ import {
|
|||||||
FlowNodeTypeEnum
|
FlowNodeTypeEnum
|
||||||
} from '@fastgpt/global/core/workflow/node/constant';
|
} from '@fastgpt/global/core/workflow/node/constant';
|
||||||
import { getHandleConfig } from '@fastgpt/global/core/workflow/template/utils';
|
import { getHandleConfig } from '@fastgpt/global/core/workflow/template/utils';
|
||||||
import { FlowNodeItemType, StoreNodeItemType } from '@fastgpt/global/core/workflow/type/node';
|
import type { FlowNodeItemType, StoreNodeItemType } from '@fastgpt/global/core/workflow/type/node';
|
||||||
import type { FlowNodeTemplateType } from '@fastgpt/global/core/workflow/type/node';
|
import type { FlowNodeTemplateType } from '@fastgpt/global/core/workflow/type/node';
|
||||||
import { VARIABLE_NODE_ID } from '@fastgpt/global/core/workflow/constants';
|
import { VARIABLE_NODE_ID } from '@fastgpt/global/core/workflow/constants';
|
||||||
import { getHandleId } from '@fastgpt/global/core/workflow/utils';
|
import { getHandleId } from '@fastgpt/global/core/workflow/utils';
|
||||||
import { StoreEdgeItemType } from '@fastgpt/global/core/workflow/type/edge';
|
import type { StoreEdgeItemType } from '@fastgpt/global/core/workflow/type/edge';
|
||||||
import { LLMModelTypeEnum } from '@fastgpt/global/core/ai/constants';
|
import { LLMModelTypeEnum } from '@fastgpt/global/core/ai/constants';
|
||||||
import {
|
import type {
|
||||||
FlowNodeInputItemType,
|
FlowNodeInputItemType,
|
||||||
FlowNodeOutputItemType
|
FlowNodeOutputItemType
|
||||||
} from '@fastgpt/global/core/workflow/type/io';
|
} from '@fastgpt/global/core/workflow/type/io';
|
||||||
import { PluginTypeEnum } from '@fastgpt/global/core/plugin/constants';
|
import { PluginTypeEnum } from '@fastgpt/global/core/plugin/constants';
|
||||||
import { getWorkflowGlobalVariables } from './utils';
|
import { getWorkflowGlobalVariables } from './utils';
|
||||||
import { TFunction } from 'next-i18next';
|
import type { TFunction } from 'next-i18next';
|
||||||
import { AppChatConfigType } from '@fastgpt/global/core/app/type';
|
import type { AppChatConfigType } from '@fastgpt/global/core/app/type';
|
||||||
|
|
||||||
export const getGlobalVariableNode = ({
|
export const getGlobalVariableNode = ({
|
||||||
nodes,
|
nodes,
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { GET, POST, PUT, DELETE } from '@/web/common/api/request';
|
import { GET, POST, PUT, DELETE } from '@/web/common/api/request';
|
||||||
import { PostWorkflowDebugProps, PostWorkflowDebugResponse } from '@/global/core/workflow/api';
|
import type { PostWorkflowDebugProps, PostWorkflowDebugResponse } from '@/global/core/workflow/api';
|
||||||
|
|
||||||
export const postWorkflowDebug = (data: PostWorkflowDebugProps) =>
|
export const postWorkflowDebug = (data: PostWorkflowDebugProps) =>
|
||||||
POST<PostWorkflowDebugResponse>(
|
POST<PostWorkflowDebugResponse>(
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { GET, POST } from '@/web/common/api/request';
|
import { GET, POST } from '@/web/common/api/request';
|
||||||
import type { PromotionRecordType } from '@/global/support/api/userRes.d';
|
import type { PromotionRecordType } from '@/global/support/api/userRes.d';
|
||||||
import { PaginationProps, PaginationResponse } from '@fastgpt/web/common/fetch/type';
|
import type { PaginationProps, PaginationResponse } from '@fastgpt/web/common/fetch/type';
|
||||||
|
|
||||||
/* get promotion init data */
|
/* get promotion init data */
|
||||||
export const getPromotionInitData = () =>
|
export const getPromotionInitData = () =>
|
||||||
|
|||||||
@ -2,15 +2,15 @@ import { GET, POST, PUT } from '@/web/common/api/request';
|
|||||||
import { hashStr } from '@fastgpt/global/common/string/tools';
|
import { hashStr } from '@fastgpt/global/common/string/tools';
|
||||||
import type { ResLogin } from '@/global/support/api/userRes.d';
|
import type { ResLogin } from '@/global/support/api/userRes.d';
|
||||||
import { UserAuthTypeEnum } from '@fastgpt/global/support/user/auth/constants';
|
import { UserAuthTypeEnum } from '@fastgpt/global/support/user/auth/constants';
|
||||||
import { UserUpdateParams } from '@/types/user';
|
import type { UserUpdateParams } from '@/types/user';
|
||||||
import { UserType } from '@fastgpt/global/support/user/type.d';
|
import type { UserType } from '@fastgpt/global/support/user/type.d';
|
||||||
import type {
|
import type {
|
||||||
FastLoginProps,
|
FastLoginProps,
|
||||||
OauthLoginProps,
|
OauthLoginProps,
|
||||||
PostLoginProps,
|
PostLoginProps,
|
||||||
SearchResult
|
SearchResult
|
||||||
} from '@fastgpt/global/support/user/api.d';
|
} from '@fastgpt/global/support/user/api.d';
|
||||||
import {
|
import type {
|
||||||
AccountRegisterBody,
|
AccountRegisterBody,
|
||||||
GetWXLoginQRResponse
|
GetWXLoginQRResponse
|
||||||
} from '@fastgpt/global/support/user/login/api.d';
|
} from '@fastgpt/global/support/user/login/api.d';
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { GET, POST } from '@/web/common/api/request';
|
import { GET, POST } from '@/web/common/api/request';
|
||||||
import type { UserInformSchema } from '@fastgpt/global/support/user/inform/type';
|
import type { UserInformSchema } from '@fastgpt/global/support/user/inform/type';
|
||||||
import { SystemMsgModalValueType } from '@fastgpt/service/support/user/inform/type';
|
import type { SystemMsgModalValueType } from '@fastgpt/service/support/user/inform/type';
|
||||||
import { PaginationProps, PaginationResponse } from '@fastgpt/web/common/fetch/type';
|
import type { PaginationProps, PaginationResponse } from '@fastgpt/web/common/fetch/type';
|
||||||
|
|
||||||
export const getInforms = (data: PaginationProps) =>
|
export const getInforms = (data: PaginationProps) =>
|
||||||
POST<PaginationResponse<UserInformSchema>>(`/proApi/support/user/inform/list`, data);
|
POST<PaginationResponse<UserInformSchema>>(`/proApi/support/user/inform/list`, data);
|
||||||
|
|||||||
@ -1,26 +1,24 @@
|
|||||||
import { GET, POST, PUT, DELETE } from '@/web/common/api/request';
|
import { GET, POST, PUT, DELETE } from '@/web/common/api/request';
|
||||||
import {
|
import type {
|
||||||
CollaboratorItemType,
|
CollaboratorItemType,
|
||||||
DeletePermissionQuery,
|
DeletePermissionQuery,
|
||||||
UpdateClbPermissionProps
|
UpdateClbPermissionProps
|
||||||
} from '@fastgpt/global/support/permission/collaborator';
|
} from '@fastgpt/global/support/permission/collaborator';
|
||||||
import {
|
import type {
|
||||||
CreateTeamProps,
|
CreateTeamProps,
|
||||||
InviteMemberProps,
|
|
||||||
InviteMemberResponse,
|
|
||||||
UpdateInviteProps,
|
UpdateInviteProps,
|
||||||
UpdateTeamProps
|
UpdateTeamProps
|
||||||
} from '@fastgpt/global/support/user/team/controller.d';
|
} from '@fastgpt/global/support/user/team/controller.d';
|
||||||
import type { TeamTagItemType, TeamTagSchema } from '@fastgpt/global/support/user/team/type';
|
import type { TeamTagItemType, TeamTagSchema } from '@fastgpt/global/support/user/team/type';
|
||||||
import {
|
import type {
|
||||||
TeamTmbItemType,
|
TeamTmbItemType,
|
||||||
TeamMemberItemType,
|
TeamMemberItemType,
|
||||||
TeamMemberSchema
|
TeamMemberSchema
|
||||||
} from '@fastgpt/global/support/user/team/type.d';
|
} from '@fastgpt/global/support/user/team/type.d';
|
||||||
import { FeTeamPlanStatusType, TeamSubSchema } from '@fastgpt/global/support/wallet/sub/type';
|
import type { FeTeamPlanStatusType, TeamSubSchema } from '@fastgpt/global/support/wallet/sub/type';
|
||||||
import { TeamInvoiceHeaderType } from '@fastgpt/global/support/user/team/type';
|
import type { TeamInvoiceHeaderType } from '@fastgpt/global/support/user/team/type';
|
||||||
import { PaginationProps, PaginationResponse } from '@fastgpt/web/common/fetch/type';
|
import type { PaginationProps, PaginationResponse } from '@fastgpt/web/common/fetch/type';
|
||||||
import {
|
import type {
|
||||||
InvitationInfoType,
|
InvitationInfoType,
|
||||||
InvitationLinkCreateType,
|
InvitationLinkCreateType,
|
||||||
InvitationLinkUpdateType,
|
InvitationLinkUpdateType,
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { DELETE, GET, POST, PUT } from '@/web/common/api/request';
|
import { DELETE, GET, POST, PUT } from '@/web/common/api/request';
|
||||||
import { MemberGroupListType } from '@fastgpt/global/support/permission/memberGroup/type';
|
import type { MemberGroupListType } from '@fastgpt/global/support/permission/memberGroup/type';
|
||||||
import {
|
import type {
|
||||||
postCreateGroupData,
|
postCreateGroupData,
|
||||||
putUpdateGroupData
|
putUpdateGroupData
|
||||||
} from '@fastgpt/global/support/user/team/group/api';
|
} from '@fastgpt/global/support/user/team/group/api';
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import type {
|
|||||||
putUpdateOrgMembersData
|
putUpdateOrgMembersData
|
||||||
} from '@fastgpt/global/support/user/team/org/api';
|
} from '@fastgpt/global/support/user/team/org/api';
|
||||||
import type { OrgType } from '@fastgpt/global/support/user/team/org/type';
|
import type { OrgType } from '@fastgpt/global/support/user/team/org/type';
|
||||||
import { putMoveOrgType } from '@fastgpt/global/support/user/team/org/api';
|
import type { putMoveOrgType } from '@fastgpt/global/support/user/team/org/api';
|
||||||
|
|
||||||
export const getOrgList = () => GET<OrgType[]>('/proApi/support/user/team/org/list');
|
export const getOrgList = () => GET<OrgType[]>('/proApi/support/user/team/org/list');
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import { GET, POST } from '@/web/common/api/request';
|
import { GET, POST } from '@/web/common/api/request';
|
||||||
import { CreateBillProps, CreateBillResponse } from '@fastgpt/global/support/wallet/bill/api';
|
import type { CreateBillProps, CreateBillResponse } from '@fastgpt/global/support/wallet/bill/api';
|
||||||
import { BillTypeEnum } from '@fastgpt/global/support/wallet/bill/constants';
|
import { BillTypeEnum } from '@fastgpt/global/support/wallet/bill/constants';
|
||||||
import type { BillSchemaType } from '@fastgpt/global/support/wallet/bill/type.d';
|
import type { BillSchemaType } from '@fastgpt/global/support/wallet/bill/type.d';
|
||||||
import { PaginationProps, PaginationResponse } from '@fastgpt/web/common/fetch/type';
|
import type { PaginationProps, PaginationResponse } from '@fastgpt/web/common/fetch/type';
|
||||||
|
|
||||||
export const getBills = (
|
export const getBills = (
|
||||||
data: PaginationProps<{
|
data: PaginationProps<{
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import { GET, POST } from '@/web/common/api/request';
|
import { GET, POST } from '@/web/common/api/request';
|
||||||
import { BillTypeEnum } from '@fastgpt/global/support/wallet/bill/constants';
|
import { BillTypeEnum } from '@fastgpt/global/support/wallet/bill/constants';
|
||||||
import { InvoiceType } from '@fastgpt/global/support/wallet/bill/type';
|
import type { InvoiceType } from '@fastgpt/global/support/wallet/bill/type';
|
||||||
import { InvoiceSchemaType } from '@fastgpt/global/support/wallet/bill/type';
|
import type { InvoiceSchemaType } from '@fastgpt/global/support/wallet/bill/type';
|
||||||
import { PaginationProps, PaginationResponse } from '@fastgpt/web/common/fetch/type';
|
import type { PaginationProps, PaginationResponse } from '@fastgpt/web/common/fetch/type';
|
||||||
export type invoiceBillDataType = {
|
export type invoiceBillDataType = {
|
||||||
type: BillTypeEnum;
|
type: BillTypeEnum;
|
||||||
price: number;
|
price: number;
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
import { POST } from '@/web/common/api/request';
|
import { POST } from '@/web/common/api/request';
|
||||||
import {
|
import type {
|
||||||
CreateTrainingUsageProps,
|
CreateTrainingUsageProps,
|
||||||
GetUsageDashboardProps,
|
GetUsageDashboardProps,
|
||||||
GetUsageDashboardResponseItem,
|
GetUsageDashboardResponseItem,
|
||||||
GetUsageProps
|
GetUsageProps
|
||||||
} from '@fastgpt/global/support/wallet/usage/api.d';
|
} from '@fastgpt/global/support/wallet/usage/api.d';
|
||||||
import type { UsageItemType } from '@fastgpt/global/support/wallet/usage/type';
|
import type { UsageItemType } from '@fastgpt/global/support/wallet/usage/type';
|
||||||
import { PaginationProps, PaginationResponse } from '@fastgpt/web/common/fetch/type';
|
import type { PaginationProps, PaginationResponse } from '@fastgpt/web/common/fetch/type';
|
||||||
|
|
||||||
export const getUserUsages = (data: PaginationProps<GetUsageProps>) =>
|
export const getUserUsages = (data: PaginationProps<GetUsageProps>) =>
|
||||||
POST<PaginationResponse<UsageItemType>>(`/proApi/support/wallet/usage/getUsage`, data);
|
POST<PaginationResponse<UsageItemType>>(`/proApi/support/wallet/usage/getUsage`, data);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user