增加重试

This commit is contained in:
2026-07-02 12:03:03 +08:00
parent ab94165af2
commit c99c134713
+1 -1
View File
@@ -71,7 +71,7 @@ func (c *Client) GenerateVideo(ctx context.Context, token, prompt, aspectRatio,
// after only the conversation object — no progress events, no videoUrl. This // after only the conversation object — no progress events, no videoUrl. This
// is transient, so retry the whole create-post + stream a few times before // is transient, so retry the whole create-post + stream a few times before
// giving up. Real out-of-credits / auth errors are returned immediately. // giving up. Real out-of-credits / auth errors are returned immediately.
const maxAttempts = 3 const maxAttempts = 5
var ( var (
postID string postID string
artifact string artifact string