trinity-tandon commited on
Commit
ea81eaf
·
verified ·
1 Parent(s): cfc1245

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -59,8 +59,8 @@ def get_top_chunks(query):
59
  client = InferenceClient('Qwen/Qwen2.5-72B-Instruct')
60
  #client is where you can change the LLM model!
61
  def respond(message,history):
62
- messages = [{'role': 'system', 'content': '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'}]
63
- if history:
64
  messages.extend(history)
65
 
66
  messages.append({"role": "user", "content": message})
 
59
  client = InferenceClient('Qwen/Qwen2.5-72B-Instruct')
60
  #client is where you can change the LLM model!
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})