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
4e7fa290
authored
Apr 10, 2025
by
heheer
Committed by
GitHub
Apr 10, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix share page dataset search show (#4506)
* fix share page dataset search show * add comment * Fix
parent
ec3bcfa1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
8 deletions
+13
-8
packages/global/core/chat/utils.ts
+7
-6
packages/global/core/workflow/runtime/type.d.ts
+1
-0
packages/service/core/workflow/dispatch/index.ts
+3
-1
projects/app/src/pages/api/v2/chat/completions.ts
+2
-1
No files found.
packages/global/core/chat/utils.ts
View file @
4e7fa290
...
...
@@ -77,6 +77,13 @@ export const getHistoryPreview = (
});
};
export
const
filterModuleTypeList
:
any
[]
=
[
FlowNodeTypeEnum
.
pluginModule
,
FlowNodeTypeEnum
.
datasetSearchNode
,
FlowNodeTypeEnum
.
tools
,
FlowNodeTypeEnum
.
pluginOutput
];
export
const
filterPublicNodeResponseData
=
({
flowResponses
=
[],
responseDetail
=
false
...
...
@@ -87,12 +94,6 @@ export const filterPublicNodeResponseData = ({
const
filedList
=
responseDetail
?
[
'quoteList'
,
'moduleType'
,
'pluginOutput'
,
'runningTime'
]
:
[
'moduleType'
,
'pluginOutput'
,
'runningTime'
];
const
filterModuleTypeList
:
any
[]
=
[
FlowNodeTypeEnum
.
pluginModule
,
FlowNodeTypeEnum
.
datasetSearchNode
,
FlowNodeTypeEnum
.
tools
,
FlowNodeTypeEnum
.
pluginOutput
];
return
flowResponses
.
filter
((
item
)
=>
filterModuleTypeList
.
includes
(
item
.
moduleType
))
...
...
packages/global/core/workflow/runtime/type.d.ts
View file @
4e7fa290
...
...
@@ -61,6 +61,7 @@ export type ChatDispatchProps = {
workflowStreamResponse
?:
WorkflowResponseType
;
workflowDispatchDeep
?:
number
;
version
?:
'v1'
|
'v2'
;
responseDetail
?:
boolean
;
};
export
type
ModuleDispatchProps
<
T
>
=
ChatDispatchProps
&
{
...
...
packages/service/core/workflow/dispatch/index.ts
View file @
4e7fa290
...
...
@@ -73,6 +73,7 @@ import { dispatchLoopStart } from './loop/runLoopStart';
import
{
dispatchFormInput
}
from
'./interactive/formInput'
;
import
{
dispatchToolParams
}
from
'./agent/runTool/toolParams'
;
import
{
getErrText
}
from
'@fastgpt/global/common/error/utils'
;
import
{
filterModuleTypeList
}
from
'@fastgpt/global/core/chat/utils'
;
const
callbackMap
:
Record
<
FlowNodeTypeEnum
,
Function
>
=
{
[
FlowNodeTypeEnum
.
workflowStart
]:
dispatchWorkflowStart
,
...
...
@@ -632,7 +633,8 @@ export async function dispatchWorkFlow(data: Props): Promise<DispatchFlowRespons
version
===
'v2'
&&
!
props
.
isToolCall
&&
!
props
.
runningAppInfo
.
isChildApp
&&
formatResponseData
formatResponseData
&&
!
(
!
props
.
responseDetail
&&
filterModuleTypeList
.
includes
(
formatResponseData
.
moduleType
))
)
{
props
.
workflowStreamResponse
?.({
event
:
SseResponseEventEnum
.
flowNodeResponse
,
...
...
projects/app/src/pages/api/v2/chat/completions.ts
View file @
4e7fa290
...
...
@@ -296,7 +296,8 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
stream
,
maxRunTimes
:
WORKFLOW_MAX_RUN_TIMES
,
workflowStreamResponse
:
workflowResponseWrite
,
version
:
'v2'
version
:
'v2'
,
responseDetail
});
}
return
Promise
.
reject
(
'您的工作流版本过低,请重新发布一次'
);
...
...
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