Spaces:
Running
Running
Update model.py
Browse files
model.py
CHANGED
@@ -23,8 +23,8 @@ def run(message: str,
|
|
23 |
result=""
|
24 |
for i in chat_history:
|
25 |
history.append({"role": "user", "content": i[0]})
|
26 |
-
if len(i[1])>0
|
27 |
-
|
28 |
print(history)
|
29 |
for response in llm.create_chat_completion(history,stream=True,max_tokens=-1,temperature=0.3,top_k=5,top_p=0.85,repeat_penalty=1.1):
|
30 |
if "content" in response["choices"][0]["delta"]:
|
|
|
23 |
result=""
|
24 |
for i in chat_history:
|
25 |
history.append({"role": "user", "content": i[0]})
|
26 |
+
if len(i[1])>0:
|
27 |
+
history.append({"role": "assistant", "content": i[1]})
|
28 |
print(history)
|
29 |
for response in llm.create_chat_completion(history,stream=True,max_tokens=-1,temperature=0.3,top_k=5,top_p=0.85,repeat_penalty=1.1):
|
30 |
if "content" in response["choices"][0]["delta"]:
|