mirror of
https://github.com/AstrBotDevs/AstrBot.git
synced 2026-10-16 15:06:04 +08:00
fix: shorten animation notice and hide frame layout details
This commit is contained in:
@@ -128,10 +128,9 @@ async def prepare_request_images(
|
||||
*req.extra_user_content_parts,
|
||||
TextPart(
|
||||
text="<system_notice>\n"
|
||||
"[Animated image] Each animated input (e.g. GIF) has been converted "
|
||||
"into a frame montage: a single image containing a grid of frames "
|
||||
"from the same animation. Read the frames left to right, then "
|
||||
"top to bottom; unused cells are blank.\n"
|
||||
"[Animated image] Each animation's frames are tiled into one image "
|
||||
"in reading order. Respond as if viewing the animation; "
|
||||
"do not mention the frame layout.\n"
|
||||
"</system_notice>"
|
||||
).mark_as_temp(),
|
||||
]
|
||||
|
||||
@@ -355,7 +355,9 @@ async def test_animation_montage_notice_reaches_model(harness, tmp_path):
|
||||
assert notices[0]._no_save
|
||||
assert notices[0].text.startswith("<system_notice>\n")
|
||||
assert notices[0].text.endswith("\n</system_notice>")
|
||||
assert "a single image containing a grid of frames" in notices[0].text
|
||||
assert "frames are tiled into one image" in notices[0].text
|
||||
assert "Respond as if viewing the animation" in notices[0].text
|
||||
assert "do not mention the frame layout" in notices[0].text
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
||||
Reference in New Issue
Block a user