Skip to content

Commit 3a781e7

Browse files
fix: fix bug of multi-round conversation in api demo
1 parent d69b062 commit 3a781e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

moss_api_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ async def create_item(request: Request):
8181
history_mp[uid] = []
8282
for i, (old_query, response) in enumerate(history_mp[uid]):
8383
prompt += '<|Human|>: ' + old_query + '<eoh>'+response
84-
prompt = '<|Human|>: ' + query + '<eoh>'
84+
prompt += '<|Human|>: ' + query + '<eoh>'
8585
max_length = json_post_list.get('max_length', 2048)
8686
top_p = json_post_list.get('top_p', 0.8)
8787
temperature = json_post_list.get('temperature', 0.7)

0 commit comments

Comments
 (0)