Update app.py
Browse files
app.py
CHANGED
|
@@ -61,8 +61,9 @@ client = InferenceClient('Qwen/Qwen2.5-72B-Instruct')
|
|
| 61 |
def respond(message,history):
|
| 62 |
gift_ideas = get_top_chunks(message)
|
| 63 |
messages = [{'role': 'system', 'content': f'You give really good gift ideas and are super helpful! You also tell me the price of each item. Give me 5 gift ideas if I ask. Use the following database for gift ideas: {gift_ideas}'}]
|
|
|
|
| 64 |
messages.extend(history)
|
| 65 |
-
|
| 66 |
messages.append({"role": "user", "content": message})
|
| 67 |
|
| 68 |
response = ""
|
|
|
|
| 61 |
def respond(message,history):
|
| 62 |
gift_ideas = get_top_chunks(message)
|
| 63 |
messages = [{'role': 'system', 'content': f'You give really good gift ideas and are super helpful! You also tell me the price of each item. Give me 5 gift ideas if I ask. Use the following database for gift ideas: {gift_ideas}'}]
|
| 64 |
+
if history:
|
| 65 |
messages.extend(history)
|
| 66 |
+
|
| 67 |
messages.append({"role": "user", "content": message})
|
| 68 |
|
| 69 |
response = ""
|