-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path即梦AI绘画.yml
More file actions
273 lines (266 loc) · 8.04 KB
/
Copy path即梦AI绘画.yml
File metadata and controls
273 lines (266 loc) · 8.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
app:
description: 即梦AI绘画,本工作流主要用到了jimeng-free-api 逆向即梦AI 在线画图功能,通过http请求方式实现即梦AI绘画
icon: 🤖
icon_background: '#FFEAD5'
mode: workflow
name: 即梦AI绘画
use_icon_as_answer_icon: false
kind: app
version: 0.1.5
workflow:
conversation_variables: []
environment_variables:
- description: ''
id: afa5c448-1ec3-432b-8f14-c8f602c0ab5d
name: jimengsessionid
selector:
- env
- jimengsessionid
value: xxxxxx
value_type: string
features:
file_upload:
allowed_file_extensions:
- .JPG
- .JPEG
- .PNG
- .GIF
- .WEBP
- .SVG
allowed_file_types:
- image
allowed_file_upload_methods:
- local_file
- remote_url
enabled: false
fileUploadConfig:
audio_file_size_limit: 50
batch_count_limit: 5
file_size_limit: 15
image_file_size_limit: 10
video_file_size_limit: 100
workflow_file_upload_limit: 10
image:
enabled: false
number_limits: 3
transfer_methods:
- local_file
- remote_url
number_limits: 3
opening_statement: ''
retriever_resource:
enabled: true
sensitive_word_avoidance:
enabled: false
speech_to_text:
enabled: false
suggested_questions: []
suggested_questions_after_answer:
enabled: false
text_to_speech:
enabled: false
language: ''
voice: ''
graph:
edges:
- data:
isInIteration: false
sourceType: start
targetType: http-request
id: 1738651659789-source-1738651665284-target
source: '1738651659789'
sourceHandle: source
target: '1738651665284'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: http-request
targetType: code
id: 1738651665284-source-1738651805602-target
source: '1738651665284'
sourceHandle: source
target: '1738651805602'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: code
targetType: end
id: 1738651805602-source-1738651831615-target
source: '1738651805602'
sourceHandle: source
target: '1738651831615'
targetHandle: target
type: custom
zIndex: 0
nodes:
- data:
desc: ''
selected: false
title: 开始
type: start
variables:
- label: 提示词
max_length: 256
options: []
required: true
type: text-input
variable: prompt
height: 90
id: '1738651659789'
position:
x: 96
y: 282
positionAbsolute:
x: 96
y: 282
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
authorization:
config: null
type: no-auth
body:
data:
- id: key-value-1
key: ''
type: text
value: '{
"model":"jimeng-2.1",
"prompt":"{{#1738651659789.prompt#}}",
"negativePrompt":"",
"width":1024,
"height":1024,
"sample_strength":0.5
}'
type: json
desc: ''
headers: Authorization:Bearer {{#env.jimengsessionid#}}
method: post
params: ''
retry_config:
max_retries: 3
retry_enabled: true
retry_interval: 100
selected: false
timeout:
max_connect_timeout: 0
max_read_timeout: 0
max_write_timeout: 0
title: HTTP 请求
type: http-request
url: https://jimeng.duckcloud.fun/v1/images/generations
variables: []
height: 136
id: '1738651665284'
position:
x: 384
y: 282
positionAbsolute:
x: 384
y: 282
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
code: "def main(arg1: str) -> str:\n import json\n\n # 解析输入的 JSON 数据\n\
\ try:\n data = json.loads(arg1)\n except json.JSONDecodeError:\n\
\ return \"输入的字符串不是有效的 JSON 格式,请检查输入数据。\"\n\n # 确保解析后的数据包含 'data'\
\ 键\n if not isinstance(data, dict) or 'data' not in data:\n return\
\ \"输入的数据格式不正确,请确保输入是一个包含 'data' 键的 JSON 对象。\"\n\n # 获取 'data' 键对应的数组数据\n\
\ image_data = data.get('data', [])\n\n # 确保 'data' 键的值是一个列表\n \
\ if not isinstance(image_data, list):\n return \"输入的数据中 'data' 键的值不是一个数组,请确保其值是一个\
\ JSON 数组对象。\"\n\n # 初始化结果字符串\n markdown_result = \"\"\n\n # 遍历每条图片数据\n\
\ for index, item in enumerate(image_data, start=1):\n # 检查每条数据是否是字典,并且包含\
\ 'url' 字段\n if not isinstance(item, dict) or 'url' not in item:\n\
\ markdown_result += f\"图片第{index}条内容:无法提取 URL(缺少 'url' 字段)\\\
n\"\n continue\n\n # 提取 URL 并生成 Markdown 格式的图片链接\n \
\ url = item['url']\n markdown_result += f\"\\\
n\"\n\n # 返回最终的 Markdown 字符串\n return {\"result\": markdown_result}"
code_language: python3
desc: ''
outputs:
result:
children: null
type: string
selected: false
title: 代码执行
type: code
variables:
- value_selector:
- '1738651665284'
- body
variable: arg1
height: 54
id: '1738651805602'
position:
x: 688
y: 282
positionAbsolute:
x: 688
y: 282
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: ''
outputs:
- value_selector:
- '1738651805602'
- result
variable: imageout
selected: false
title: 结束
type: end
height: 90
id: '1738651831615'
position:
x: 992
y: 282
positionAbsolute:
x: 992
y: 282
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
author: 周辉
desc: ''
height: 124
selected: false
showAuthor: true
text: '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"本工作流主要是使用开源","type":"text","version":1},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"jimeng-free-api","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"link","version":1,"rel":null,"target":null,"title":null,"url":"https://github.com/LLM-Red-Team/jimeng-free-api"},{"detail":0,"format":0,"mode":"normal","style":"","text":"项目实现即梦AI逆向API
通过http请求整合实现dify工作流上即梦AI绘画功能","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}'
theme: blue
title: ''
type: ''
width: 286
height: 124
id: '1738658448946'
position:
x: 96
y: 438.8385301969082
positionAbsolute:
x: 96
y: 438.8385301969082
selected: true
sourcePosition: right
targetPosition: left
type: custom-note
width: 286
viewport:
x: -12.807763299068597
y: -120.09309774650524
zoom: 1.1486983549970349