4.6.3-website dataset (#532)

This commit is contained in:
Archer
2023-12-03 20:45:57 +08:00
committed by GitHub
parent b916183848
commit a9ae270335
122 changed files with 3793 additions and 1360 deletions

View File

@@ -35,13 +35,11 @@ export async function authUser({
user: UserType;
}
> {
const { userId, teamId, tmbId } = await parseHeaderCert(props);
const result = await parseHeaderCert(props);
return {
userId,
teamId,
tmbId,
user: await getUserAndAuthBalance({ tmbId, minBalance }),
...result,
user: await getUserAndAuthBalance({ tmbId: result.tmbId, minBalance }),
isOwner: true,
canWrite: true
};

View File

@@ -12,14 +12,18 @@ export function createBill(data: CreateBillProps) {
if (data.total === 0) {
addLog.info('0 Bill', data);
}
POST('/support/wallet/bill/createBill', data);
try {
POST('/support/wallet/bill/createBill', data);
} catch (error) {}
}
export function concatBill(data: ConcatBillProps) {
if (!global.systemEnv.pluginBaseUrl) return;
if (data.total === 0) {
addLog.info('0 Bill', data);
}
POST('/support/wallet/bill/concatBill', data);
try {
POST('/support/wallet/bill/concatBill', data);
} catch (error) {}
}
export const pushChatBill = ({
@@ -92,7 +96,7 @@ export const pushQABill = async ({
return { total };
};
export const pushGenerateVectorBill = async ({
export const pushGenerateVectorBill = ({
billId,
teamId,
tmbId,
@@ -250,7 +254,7 @@ export function pushReRankBill({
source: `${BillSourceEnum}`;
}) {
const model = global.reRankModels[0];
if (!model) return;
if (!model) return { total: 0 };
const total = model.price * PRICE_SCALE;
const name = 'wallet.bill.ReRank';
@@ -270,4 +274,6 @@ export function pushReRankBill({
}
]
});
return { total };
}