Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
7942805a
authored
Oct 09, 2025
by
Archer
Committed by
GitHub
Oct 09, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: usage repeat (#5735)
* fix: usage repeat * remove invalid code
parent
b8c2c7ad
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
8 deletions
+11
-8
packages/service/core/workflow/dispatch/ai/agent/toolCall.ts
+1
-0
packages/service/support/wallet/usage/schema.ts
+10
-2
packages/service/support/wallet/usage/type.d.ts
+0
-6
No files found.
packages/service/core/workflow/dispatch/ai/agent/toolCall.ts
View file @
7942805a
...
@@ -386,6 +386,7 @@ export const runToolCall = async (
...
@@ -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
});
});
...
...
packages/service/support/wallet/usage/schema.ts
View file @
7942805a
...
@@ -8,7 +8,8 @@ import {
...
@@ -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({
...
@@ -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
,
...
...
packages/service/support/wallet/usage/type.d.ts
deleted
100644 → 0
View file @
b8c2c7ad
import
type
{
ConcatUsageProps
}
from
'@fastgpt/global/support/wallet/usage/api'
;
declare
global
{
var
reduceAiPointsQueue
:
{
teamId
:
string
;
totalPoints
:
number
}[];
var
concatBillQueue
:
ConcatUsageProps
[];
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment