mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-19 10:07:24 +00:00
@@ -386,6 +386,7 @@ export const runToolCall = async (
|
|||||||
initToolNodes(runtimeNodes, [toolNode.nodeId], startParams);
|
initToolNodes(runtimeNodes, [toolNode.nodeId], startParams);
|
||||||
const toolRunResponse = await runWorkflow({
|
const toolRunResponse = await runWorkflow({
|
||||||
...workflowProps,
|
...workflowProps,
|
||||||
|
usageId: undefined,
|
||||||
isToolCall: true
|
isToolCall: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -8,7 +8,8 @@ import {
|
|||||||
} from '@fastgpt/global/support/user/team/constant';
|
} from '@fastgpt/global/support/user/team/constant';
|
||||||
import { UsageCollectionName, UsageItemCollectionName } from './constants';
|
import { UsageCollectionName, UsageItemCollectionName } from './constants';
|
||||||
|
|
||||||
const UsageSchema = new Schema({
|
const UsageSchema = new Schema(
|
||||||
|
{
|
||||||
teamId: {
|
teamId: {
|
||||||
type: Schema.Types.ObjectId,
|
type: Schema.Types.ObjectId,
|
||||||
ref: TeamCollectionName,
|
ref: TeamCollectionName,
|
||||||
@@ -53,7 +54,14 @@ const UsageSchema = new Schema({
|
|||||||
list: {
|
list: {
|
||||||
type: Array
|
type: Array
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
|
{
|
||||||
|
// Auto update time
|
||||||
|
timestamps: {
|
||||||
|
updatedAt: 'time'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
UsageSchema.virtual('usageItems', {
|
UsageSchema.virtual('usageItems', {
|
||||||
ref: UsageItemCollectionName,
|
ref: UsageItemCollectionName,
|
||||||
|
@@ -1,6 +0,0 @@
|
|||||||
import type { ConcatUsageProps } from '@fastgpt/global/support/wallet/usage/api';
|
|
||||||
|
|
||||||
declare global {
|
|
||||||
var reduceAiPointsQueue: { teamId: string; totalPoints: number }[];
|
|
||||||
var concatBillQueue: ConcatUsageProps[];
|
|
||||||
}
|
|
Reference in New Issue
Block a user