🐛 fix zephyr prompt system message
This commit is contained in:
parent
4fe45a9d08
commit
1d9d2aeb34
2 changed files with 2 additions and 2 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue