chore/ 精简展示AI活动的日志
This commit is contained in:
@@ -195,3 +195,17 @@ def test_format_history_string_includes_system_for_debug_logs() -> None:
|
||||
assert "System: SYS_INSTRUCTIONS" in s
|
||||
assert "Human: hi" in s
|
||||
assert "Assistant: hello" in s
|
||||
|
||||
|
||||
def test_format_history_string_omit_system_body() -> None:
|
||||
s = format_history_string(
|
||||
[
|
||||
SystemMessage(content="SYS_INSTRUCTIONS"),
|
||||
HumanMessage(content="hi"),
|
||||
],
|
||||
omit_system_body=True,
|
||||
)
|
||||
assert "SYS_INSTRUCTIONS" not in s
|
||||
assert "System: <omitted total_len=16" in s
|
||||
assert "sha12=" in s
|
||||
assert "Human: hi" in s
|
||||
|
||||
Reference in New Issue
Block a user