🐛 fix zephyr prompt system message

This commit is contained in:
Nate Sesti 2023-11-08 15:40:31 -08:00
parent 4fe45a9d08
commit 1d9d2aeb34
2 changed files with 2 additions and 2 deletions

View file

@ -34,6 +34,8 @@ def zephyr_template_messages(msgs: List[Dict[str, str]]) -> str:
if msgs[0]["role"] == "system":
prompt += f"<|system|>{msgs[0]['content']}</s>\n"
msgs.pop(0)
else:
prompt += "<|system|> </s>\n"
for msg in msgs:
prompt += "<|user|>\n" if msg["role"] == "user" else "<|assistant|>\n"

View file

@ -30,10 +30,8 @@ async def list_sessions():
"""List all sessions"""
sessions_list_file = getSessionsListFilePath()
if not os.path.exists(sessions_list_file):
print("Returning empty sessions list")
return []
sessions = json.load(open(sessions_list_file, "r"))
print("Returning sessions list: ", sessions)
return sessions