From 25dee73c0f3517d579d82f6025879c6400c49f55 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 10 Apr 2024 08:33:27 -0500 Subject: [PATCH] Distinguish an empty system message from an unspecified one .. when deciding whether to use the API's default system message --- src/chap/commands/tui.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/chap/commands/tui.py b/src/chap/commands/tui.py index a9d186b..a1ba4d5 100644 --- a/src/chap/commands/tui.py +++ b/src/chap/commands/tui.py @@ -292,7 +292,9 @@ def main(obj: Obj, replace_system_prompt: bool) -> None: assert session_filename is not None if replace_system_prompt: - session[0].content = obj.system_message or api.system_message + session[0].content = ( + api.system_message if obj.system_message is None else obj.system_message + ) tui = Tui(api, session) tui.run()