model server fix message model

This commit is contained in:
yhjun1026 2023-06-01 18:08:27 +08:00
parent 084656245e
commit 98a7bf93f6
2 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ def chatglm_generate_stream(
# # Add history conversation # # Add history conversation
hist = [] hist = []
once_conversation = [] once_conversation = []
for message in messages: for message in messages[:-2]:
if len(message) <= 0: if len(message) <= 0:
continue continue
@ -51,7 +51,7 @@ def chatglm_generate_stream(
# else: # else:
# once_conversation.append(f"""###system:{message} """) # once_conversation.append(f"""###system:{message} """)
query = messages[-1].split("human:")[1] query = messages[-2].split("human:")[1]
print("Query Message: ", query) print("Query Message: ", query)
# output = "" # output = ""
# i = 0 # i = 0

Binary file not shown.