consy commited on
Commit
01c8eff
·
verified ·
1 Parent(s): 256ddc8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -112,9 +112,10 @@ client = InferenceClient("microsoft/phi-4")
112
  # name of llm chatbot accessed ^^ or can use ' microsoft/phi-4 that's connected to the microsoft phi gen model
113
 
114
  def respond(message,history):
115
-
116
- messages = [{'role': 'system','content':'You are a friendly chatbot.'}]
117
- #creating dictionary containing key value pairs; first key value pair is system message, second is user message
 
118
 
119
  if history:
120
  messages.extend(history)
 
112
  # name of llm chatbot accessed ^^ or can use ' microsoft/phi-4 that's connected to the microsoft phi gen model
113
 
114
  def respond(message,history):
115
+
116
+ info = get_top_chunks(message, chunk_embeddings, text_chunks)
117
+ messages = [{'role': 'system','content':f'You are a friendly chatbot using {info} to answer questions.'}]
118
+ #use string interporlation with variable info
119
 
120
  if history:
121
  messages.extend(history)