移除提词fps参数
This commit is contained in:
@@ -68,7 +68,7 @@ async def _build_user_content(record: ChatGenerationTask, db: AsyncSession | Non
|
|||||||
if ref_type == "image":
|
if ref_type == "image":
|
||||||
parts.append({"type": "image_url", "image_url": {"url": url}})
|
parts.append({"type": "image_url", "image_url": {"url": url}})
|
||||||
elif ref_type == "video":
|
elif ref_type == "video":
|
||||||
parts.append({"type": "video_url", "video_url": {"url": url, "fps": settings.CHATAPI_VIDEO_FPS}})
|
parts.append({"type": "video_url", "video_url": {"url": url}})
|
||||||
return parts
|
return parts
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -742,8 +742,8 @@ def build_user_message(user_content: str, references: list[dict[str, str]], refe
|
|||||||
content_parts.append({"type": "image_url", "image_url": {"url": ref_url}})
|
content_parts.append({"type": "image_url", "image_url": {"url": ref_url}})
|
||||||
log_content_parts.append({"type": "image_url", "image_url": {"url": ref_url}})
|
log_content_parts.append({"type": "image_url", "image_url": {"url": ref_url}})
|
||||||
elif ref_type == "video":
|
elif ref_type == "video":
|
||||||
content_parts.append({"type": "video_url", "video_url": {"url": ref_url, "fps": reference_video_fps}})
|
content_parts.append({"type": "video_url", "video_url": {"url": ref_url}})
|
||||||
log_content_parts.append({"type": "video_url", "video_url": {"url": ref_url, "fps": reference_video_fps}})
|
log_content_parts.append({"type": "video_url", "video_url": {"url": ref_url}})
|
||||||
return {"role": "user", "content": content_parts}, {"role": "user", "content": log_content_parts}
|
return {"role": "user", "content": content_parts}, {"role": "user", "content": log_content_parts}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -88,7 +88,6 @@ async def build_user_message(user_text: str, video_url: str, db=None) -> tuple[d
|
|||||||
"type": "video_url",
|
"type": "video_url",
|
||||||
"video_url": {
|
"video_url": {
|
||||||
"url": real_url,
|
"url": real_url,
|
||||||
"fps": _video_fps(),
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{"type": "text", "text": user_text},
|
{"type": "text", "text": user_text},
|
||||||
@@ -98,7 +97,6 @@ async def build_user_message(user_text: str, video_url: str, db=None) -> tuple[d
|
|||||||
"type": "video_url",
|
"type": "video_url",
|
||||||
"video_url": {
|
"video_url": {
|
||||||
"url": video_url,
|
"url": video_url,
|
||||||
"fps": _video_fps(),
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{"type": "text", "text": user_text},
|
{"type": "text", "text": user_text},
|
||||||
|
|||||||
Reference in New Issue
Block a user