File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -125,13 +125,14 @@ def ark_field_reorganization(request_data: dict) -> dict:
125125 # If a system prompt is needed, it should be placed in the system role message within the input, instead of using the instructions parameter.
126126 # https://www.volcengine.com/docs/82379/1585128
127127 instructions = request_data .pop ("instructions" , None )
128- request_data ["input" ] = [
129- {
130- "content" : [{"text" : instructions , "type" : "input_text" }],
131- "role" : "system" ,
132- "type" : "message" ,
133- }
134- ] + request_data ["input" ]
128+ if instructions :
129+ request_data ["input" ] = [
130+ {
131+ "content" : [{"text" : instructions , "type" : "input_text" }],
132+ "role" : "system" ,
133+ "type" : "message" ,
134+ }
135+ ] + request_data ["input" ]
135136
136137 return request_data
137138
You can’t perform that action at this time.
0 commit comments