Update app.py
Browse files
app.py
CHANGED
@@ -58,7 +58,7 @@ def preprocess_response(response: str) -> str:
|
|
58 |
|
59 |
def shorten_response(response: str) -> str:
|
60 |
"""Uses the Zephyr model to shorten and refine the response."""
|
61 |
-
messages = [{"role": "system", "content": "Shorten and refine this response in a supportive and empathetic manner."}, {"role": "user", "content": response}]
|
62 |
result = client.chat_completion(messages, max_tokens=512, temperature=0.5, top_p=0.9)
|
63 |
return result.choices[0].message['content'].strip()
|
64 |
|
|
|
58 |
|
59 |
def shorten_response(response: str) -> str:
|
60 |
"""Uses the Zephyr model to shorten and refine the response."""
|
61 |
+
messages = [{"role": "system", "content": "Greet, Shorten and refine this response in a supportive and empathetic manner."}, {"role": "user", "content": response}]
|
62 |
result = client.chat_completion(messages, max_tokens=512, temperature=0.5, top_p=0.9)
|
63 |
return result.choices[0].message['content'].strip()
|
64 |
|