diff --git a/app/services/grok/utils/process.py b/app/services/grok/utils/process.py index 378aefd..4ad7c7a 100644 --- a/app/services/grok/utils/process.py +++ b/app/services/grok/utils/process.py @@ -84,6 +84,16 @@ async def _with_idle_timeout( idle_timeout: 空闲超时时间(秒),0 表示禁用 model: 模型名称(用于日志) """ + try: + idle_timeout = float(idle_timeout or 0) + except (ValueError, TypeError): + idle_timeout = 0.0 + + try: + first_item_timeout = float(first_item_timeout or 0) if first_item_timeout is not None else 0.0 + except (ValueError, TypeError): + first_item_timeout = 0.0 + if idle_timeout <= 0: async for item in iterable: yield item diff --git a/app/static/public/js/video.js b/app/static/public/js/video.js index bdc979a..12dd44e 100644 --- a/app/static/public/js/video.js +++ b/app/static/public/js/video.js @@ -843,7 +843,7 @@ }, body: JSON.stringify({ prompt, - image_url: imageUrl || null, + image_url: parentPostId ? null : (imageUrl || null), parent_post_id: parentPostId || null, source_image_url: parentPostId ? (resolvedRef.sourceUrl || imageUrl || null) : null, reasoning_effort: DEFAULT_REASONING_EFFORT,