mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-02 12:48:30 +00:00
4.6.3-website dataset (#532)
This commit is contained in:
@@ -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
|
||||
};
|
||||
|
@@ -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 };
|
||||
}
|
||||
|
Reference in New Issue
Block a user