Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
| 117 |
-
|
|
|
|
| 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)
|