fix: cannot unmarshal object into Go struct field SubActionResult error

This commit is contained in:
lilong.129
2025-07-04 20:46:11 +08:00
parent ac036d5526
commit 7fac0dcc00

View File

@@ -167,7 +167,7 @@ func (dExt *XTDriver) StartToGoal(ctx context.Context, prompt string, opts ...op
log.Error().Err(err).
Str("action", toolCall.Function.Name).
Msg("invoke tool call failed")
subActionResult.Error = err
subActionResult.Error = err.Error()
return err
}
return nil
@@ -400,7 +400,7 @@ type SubActionResult struct {
Arguments interface{} `json:"arguments,omitempty"` // arguments passed to the sub-action
StartTime int64 `json:"start_time"` // sub-action start time
Elapsed int64 `json:"elapsed_ms"` // sub-action elapsed time(ms)
Error error `json:"error,omitempty"` // sub-action execution result
Error string `json:"error,omitempty"` // sub-action execution result
SessionData
}