Spaces:
Running
on
Zero
Running
on
Zero
indiejoseph
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -42,8 +42,7 @@ def generate(
|
|
42 |
repetition_penalty: float = 1.2,
|
43 |
) -> str:
|
44 |
conversation = []
|
45 |
-
if system_prompt
|
46 |
-
conversation.append({"role": "system", "content": system_prompt})
|
47 |
for user, assistant in chat_history:
|
48 |
conversation.extend([{"role": "user", "content": user}, {"role": "assistant", "content": assistant}])
|
49 |
conversation.append({"role": "user", "content": message})
|
|
|
42 |
repetition_penalty: float = 1.2,
|
43 |
) -> str:
|
44 |
conversation = []
|
45 |
+
conversation.append({"role": "system", "content": system_prompt if system_prompt else "你係由 hon9kon9ize 開發嘅 CantoneseLLM,你係一個好幫得手嘅助理" })
|
|
|
46 |
for user, assistant in chat_history:
|
47 |
conversation.extend([{"role": "user", "content": user}, {"role": "assistant", "content": assistant}])
|
48 |
conversation.append({"role": "user", "content": message})
|