mingbaer commited on
Commit
0335455
·
verified ·
1 Parent(s): d90e48d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -53,8 +53,9 @@ def get_top_chunks(query, chunk_embeddings, text_chunks):
53
  client = InferenceClient("microsoft/phi-4")
54
 
55
  def respond(message, history):
56
-
57
- messages = [{"role": "system", "content": "You are a friendly chatbot."}]
 
58
 
59
  if history:
60
  messages.extend(history)
 
53
  client = InferenceClient("microsoft/phi-4")
54
 
55
  def respond(message, history):
56
+
57
+ info = get_top_chunks(message, chunk_emeddings, text_chunks)
58
+ messages = [{"role": "system", "content": f"You are a friendly chatbot using {info} to answer questions."}]
59
 
60
  if history:
61
  messages.extend(history)