Skip to content

Commit 6fa2acf

Browse files
fix: workflow as tool, not be serialized where has not parameters (#1777)
1 parent fc47e40 commit 6fa2acf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backend/domain/workflow/internal/compose/workflow_tool.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func (i *invokableWorkflow) InvokableRun(ctx context.Context, argumentsInJSON st
108108
ws *nodes.ConversionWarnings
109109
)
110110

111-
if rInfo == nil {
111+
if rInfo == nil && len(i.wfEntity.InputParams) > 0 {
112112
if err = sonic.UnmarshalString(argumentsInJSON, &in); err != nil {
113113
return "", err
114114
}
@@ -257,7 +257,7 @@ func (s *streamableWorkflow) StreamableRun(ctx context.Context, argumentsInJSON
257257
ws *nodes.ConversionWarnings
258258
)
259259

260-
if rInfo == nil {
260+
if rInfo == nil && len(s.wfEntity.InputParams) > 0 {
261261
if err = sonic.UnmarshalString(argumentsInJSON, &in); err != nil {
262262
return nil, err
263263
}

0 commit comments

Comments
 (0)