This commit is contained in:
2026-07-10 10:59:14 +08:00
parent 6350df7c03
commit a636f79cd8
3 changed files with 31 additions and 71 deletions
+3 -3
View File
@@ -80,9 +80,9 @@ func (c *Client) GenerateVideo(ctx context.Context, token, prompt, aspectRatio,
// grok occasionally accepts the conversation (HTTP 200) but closes the stream
// after only the conversation object — no progress events, no videoUrl. This
// is transient, so retry the whole create-post + stream a few times before
// giving up. Real out-of-credits / auth errors are returned immediately.
const maxAttempts = 5
// is transient and surfaces as ErrTemporaryUpstream so the caller fails over
// to the NEXT account (换号重试) instead of retrying this one.
const maxAttempts = 1
var (
postID string
artifact string