Add {date} replacement to chat (#17430)

This commit is contained in:
Wang Qi
2026-07-28 09:49:17 +08:00
committed by GitHub
parent 15f8ef7409
commit 619b58faef
4 changed files with 17 additions and 8 deletions

View File

@@ -1192,7 +1192,7 @@ def test_chat_create_allows_default_knowledge_placeholder_without_sources_unit(m
assert res["code"] == 0
assert saved["kb_ids"] == []
assert saved["prompt_config"]["system"].find("{knowledge}") >= 0
assert saved["prompt_config"]["parameters"] == [{"key": "knowledge", "optional": False}]
assert saved["prompt_config"]["parameters"] == [{"key": "knowledge", "optional": False}, {"key": "date", "optional": True}]
@pytest.mark.p2