Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
db78b91e
Commit
db78b91e
authored
Mar 13, 2024
by
Joel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: http output
parent
25a11c5b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
constants.ts
web/app/components/workflow/constants.ts
+15
-0
utils.ts
...ponents/workflow/nodes/_base/components/variable/utils.ts
+6
-0
No files found.
web/app/components/workflow/constants.ts
View file @
db78b91e
...
...
@@ -297,3 +297,18 @@ export const COMPLETION_QUESTION_CLASSIFIER_OUTPUT_STRUCT = [
},
...
QUESTION_CLASSIFIER_OUTPUT_STRUCT_COMMON
,
]
export
const
HTTP_REQUEST_OUTPUT_STRUCT
:
Var
[]
=
[
{
variable
:
'body'
,
type
:
VarType
.
string
,
},
{
variable
:
'status_code'
,
type
:
VarType
.
string
,
},
{
variable
:
'headers'
,
type
:
VarType
.
string
,
},
]
web/app/components/workflow/nodes/_base/components/variable/utils.ts
View file @
db78b91e
...
...
@@ -5,6 +5,7 @@ import type { NodeOutPutVar } from '@/app/components/workflow/types'
import
{
CHAT_QUESTION_CLASSIFIER_OUTPUT_STRUCT
,
COMPLETION_QUESTION_CLASSIFIER_OUTPUT_STRUCT
,
HTTP_REQUEST_OUTPUT_STRUCT
,
KNOWLEDGE_RETRIEVAL_OUTPUT_STRUCT
,
LLM_OUTPUT_STRUCT
,
SUPPORT_OUTPUT_VARS_NODE
,
...
...
@@ -71,6 +72,11 @@ const formatItem = (item: any, isChatMode: boolean): NodeOutPutVar => {
res
.
vars
=
isChatMode
?
CHAT_QUESTION_CLASSIFIER_OUTPUT_STRUCT
:
COMPLETION_QUESTION_CLASSIFIER_OUTPUT_STRUCT
break
}
case
BlockEnum
.
HttpRequest
:
{
res
.
vars
=
HTTP_REQUEST_OUTPUT_STRUCT
break
}
}
return
res
...
...
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