Spaces:
Build error
Build error
Turned random into general chatbot
Browse filesTurned that chatbot of random choices into more dynamic conversation.
app.py
CHANGED
|
@@ -6,7 +6,7 @@ client = InferenceClient("microsoft/phi-4")
|
|
| 6 |
def respond(message, history):
|
| 7 |
messages({"role": "system", "content": "You are a friendly chatbot."})
|
| 8 |
if history:
|
| 9 |
-
messages.extend(history)
|
| 10 |
|
| 11 |
messages.append({"role":,"user","content": message})
|
| 12 |
response = client.chat_completion(
|
|
|
|
| 6 |
def respond(message, history):
|
| 7 |
messages({"role": "system", "content": "You are a friendly chatbot."})
|
| 8 |
if history:
|
| 9 |
+
messages.extend(history)
|
| 10 |
|
| 11 |
messages.append({"role":,"user","content": message})
|
| 12 |
response = client.chat_completion(
|