Revert "sub plan page (#885)" (#886)

This reverts commit 443ad37b6a.
This commit is contained in:
Archer
2024-02-23 17:48:15 +08:00
committed by GitHub
parent 443ad37b6a
commit fd9b6291af
246 changed files with 4281 additions and 6286 deletions

View File

@@ -1,50 +0,0 @@
import { UsageSourceEnum } from '@fastgpt/global/support/wallet/usage/constants';
import { MongoUsage } from './schema';
import { ClientSession } from '../../../common/mongo';
export const createTrainingUsage = async ({
teamId,
tmbId,
appName,
billSource,
vectorModel,
agentModel,
session
}: {
teamId: string;
tmbId: string;
appName: string;
billSource: `${UsageSourceEnum}`;
vectorModel: string;
agentModel: string;
session?: ClientSession;
}) => {
const [{ _id }] = await MongoUsage.create(
[
{
teamId,
tmbId,
appName,
source: billSource,
totalPoints: 0,
list: [
{
moduleName: 'support.wallet.moduleName.index',
model: vectorModel,
charsLength: 0,
amount: 0
},
{
moduleName: 'support.wallet.moduleName.qa',
model: agentModel,
charsLength: 0,
amount: 0
}
]
}
],
{ session }
);
return { billId: String(_id) };
};