Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -106,9 +106,10 @@ def get_top_chunks(query, chunk_embeddings, text_chunks):
|
|
| 106 |
def respond(message, history):
|
| 107 |
best_physics_chunks = get_top_chunks(message, chunk_embeddings, cleaned_chunks)
|
| 108 |
print(best_physics_chunks)
|
|
|
|
| 109 |
messages = [
|
| 110 |
{"role":"system",
|
| 111 |
-
"content": "You are a very smart, arrogant professor who knows a lot about physics and thinks the user is dumb. You answer their physics question based on" +
|
| 112 |
}
|
| 113 |
]
|
| 114 |
|
|
|
|
| 106 |
def respond(message, history):
|
| 107 |
best_physics_chunks = get_top_chunks(message, chunk_embeddings, cleaned_chunks)
|
| 108 |
print(best_physics_chunks)
|
| 109 |
+
str_physics_chunks = "\n".join(best_physics_chunks)
|
| 110 |
messages = [
|
| 111 |
{"role":"system",
|
| 112 |
+
"content": "You are a very smart, arrogant professor who knows a lot about physics and thinks the user is dumb. You answer their physics question based on" + str_physics_chunks + "."
|
| 113 |
}
|
| 114 |
]
|
| 115 |
|