fix: workflow as tool, not be serialized where has not parameters (#1777)

This commit is contained in:
Zhj 2025-08-25 14:30:33 +08:00 committed by GitHub
parent fc47e4096c
commit 6fa2acf05a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -108,7 +108,7 @@ func (i *invokableWorkflow) InvokableRun(ctx context.Context, argumentsInJSON st
ws *nodes.ConversionWarnings ws *nodes.ConversionWarnings
) )
if rInfo == nil { if rInfo == nil && len(i.wfEntity.InputParams) > 0 {
if err = sonic.UnmarshalString(argumentsInJSON, &in); err != nil { if err = sonic.UnmarshalString(argumentsInJSON, &in); err != nil {
return "", err return "", err
} }
@ -257,7 +257,7 @@ func (s *streamableWorkflow) StreamableRun(ctx context.Context, argumentsInJSON
ws *nodes.ConversionWarnings ws *nodes.ConversionWarnings
) )
if rInfo == nil { if rInfo == nil && len(s.wfEntity.InputParams) > 0 {
if err = sonic.UnmarshalString(argumentsInJSON, &in); err != nil { if err = sonic.UnmarshalString(argumentsInJSON, &in); err != nil {
return nil, err return nil, err
} }