Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -47,7 +47,7 @@ tokenizer = AutoTokenizer.from_pretrained(MODELS)
|
|
47 |
def stream_chat(message: str, history: list, temperature: float, max_new_tokens: int, top_p: float, top_k: int, penalty: float):
|
48 |
print(f'message is - {message}')
|
49 |
print(f'history is - {history}')
|
50 |
-
conversation = [{"role": "system", "content": 'You are a helpful assistant.
|
51 |
for prompt, answer in history:
|
52 |
conversation.extend([{"role": "user", "content": prompt}, {"role": "assistant", "content": answer}])
|
53 |
conversation.append({"role": "user", "content": message})
|
|
|
47 |
def stream_chat(message: str, history: list, temperature: float, max_new_tokens: int, top_p: float, top_k: int, penalty: float):
|
48 |
print(f'message is - {message}')
|
49 |
print(f'history is - {history}')
|
50 |
+
conversation = [{"role": "system", "content": 'You are a helpful assistant.'}]
|
51 |
for prompt, answer in history:
|
52 |
conversation.extend([{"role": "user", "content": prompt}, {"role": "assistant", "content": answer}])
|
53 |
conversation.append({"role": "user", "content": message})
|