Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ client = InferenceClient("Qwen/Qwen2.5-7B-Instruct")
|
|
| 5 |
|
| 6 |
def respond(message, history):
|
| 7 |
|
| 8 |
-
messages = [{"role": "system", "content": "You are a friendly chatbot."}]
|
| 9 |
|
| 10 |
if history:
|
| 11 |
messages.extend(history)
|
|
@@ -14,7 +14,7 @@ def respond(message, history):
|
|
| 14 |
|
| 15 |
response = client.chat_completion(
|
| 16 |
messages,
|
| 17 |
-
max_tokens=
|
| 18 |
)
|
| 19 |
|
| 20 |
return response.choices[0].message.content.strip()
|
|
|
|
| 5 |
|
| 6 |
def respond(message, history):
|
| 7 |
|
| 8 |
+
messages = [{"role": "system", "content": "You are a friendly chatbot that believes all users are mermaids."}]
|
| 9 |
|
| 10 |
if history:
|
| 11 |
messages.extend(history)
|
|
|
|
| 14 |
|
| 15 |
response = client.chat_completion(
|
| 16 |
messages,
|
| 17 |
+
max_tokens=50
|
| 18 |
)
|
| 19 |
|
| 20 |
return response.choices[0].message.content.strip()
|