优化已发现问题
This commit is contained in:
@@ -453,14 +453,15 @@ def finish_generating_message(message: CreationMessage, *, assets: list[dict], m
|
||||
is_deleted=False,
|
||||
purged_at__isnull=True,
|
||||
).first()
|
||||
is_pet = "宠物" in str(conversation.preset or "")
|
||||
if model is None:
|
||||
model = Model.objects.create(
|
||||
team=conversation.team,
|
||||
created_by=conversation.created_by,
|
||||
name="平台生成出镜人物",
|
||||
name="平台生成宠物角色" if is_pet else "平台生成出镜人物",
|
||||
source=Model.Source.AI,
|
||||
portrait_asset=asset,
|
||||
description="由全能创作生成并锁定的视频出镜人物。",
|
||||
description="由全能创作生成并锁定的宠物角色。" if is_pet else "由全能创作生成并锁定的视频出镜人物。",
|
||||
metadata={"feature": "omni_create", "conversation_id": str(conversation.id)},
|
||||
)
|
||||
pin_refs(conversation, [{
|
||||
@@ -484,10 +485,22 @@ def finish_generating_message(message: CreationMessage, *, assets: list[dict], m
|
||||
append_message(
|
||||
conversation,
|
||||
role="assistant",
|
||||
text="人物参考已生成并锁定。后续所有镜头和长视频分段都会使用这位人物。",
|
||||
text=(
|
||||
"宠物角色已生成。你看这只宠物合适吗?是否使用这个宠物角色继续创作?"
|
||||
if is_pet else
|
||||
"人物参考已生成。你看这位角色合适吗?是否使用这个角色继续创作?"
|
||||
),
|
||||
payload={
|
||||
"reply_hint": "继续创作…",
|
||||
"reply_options": [{"label": "继续创作", "text": "继续创作"}],
|
||||
"reply_hint": (
|
||||
"回复「使用这个角色」继续,或说明想要的宠物品种与外观…"
|
||||
if is_pet else
|
||||
"回复「使用这个角色」继续,或说明想调整的地方…"
|
||||
),
|
||||
"reply_options": [
|
||||
{"label": "使用这个角色", "text": "使用这个角色继续创作"},
|
||||
{"label": "重新生成一个", "text": "重新生成一个宠物角色" if is_pet else "重新生成一个角色"},
|
||||
{"label": "上传其他宠物" if is_pet else "上传其他人物", "text": "我上传宠物参考图" if is_pet else "我上传人物参考图"},
|
||||
],
|
||||
},
|
||||
)
|
||||
return message
|
||||
|
||||
Reference in New Issue
Block a user