change: RoundToOneDecimal

This commit is contained in:
lilong.129
2025-06-05 17:47:29 +08:00
parent c4e7ab00a7
commit 8cdc71d90b
6 changed files with 27 additions and 18 deletions

View File

@@ -25,6 +25,12 @@ func (dExt *XTDriver) StartToGoal(text string, opts ...option.ActionOption) erro
attempt++
log.Info().Int("attempt", attempt).Msg("planning attempt")
if err := dExt.AIAction(text, opts...); err != nil {
// Check if this is a LLM service request error that should be retried
if errors.Is(err, code.LLMRequestServiceError) {
log.Warn().Err(err).Int("attempt", attempt).
Msg("LLM service request failed, retrying...")
continue
}
return err
}