added "context = "\n".join(top_chunks)" line
Browse files
app.py
CHANGED
|
@@ -58,6 +58,9 @@ def get_top_chunks (query, chunk_embeddings, cleaned_chunks):
|
|
| 58 |
def respond(message, history):
|
| 59 |
|
| 60 |
top_results = get_top_chunks(message, chunk_embeddings, cleaned_chunks)
|
|
|
|
|
|
|
|
|
|
| 61 |
|
| 62 |
messages = [{"role": "system", "content": "You are a clairvoyant chatbot with vast knowledge on zodiac signs, but you also give the information very clearly so users can understand the message you're conveying."}]
|
| 63 |
|
|
|
|
| 58 |
def respond(message, history):
|
| 59 |
|
| 60 |
top_results = get_top_chunks(message, chunk_embeddings, cleaned_chunks)
|
| 61 |
+
|
| 62 |
+
# allows LLM to interpret information better; without it would yield a Python list for the LLM to interpret which isn't as clean
|
| 63 |
+
context = "\n".join(top_chunks)
|
| 64 |
|
| 65 |
messages = [{"role": "system", "content": "You are a clairvoyant chatbot with vast knowledge on zodiac signs, but you also give the information very clearly so users can understand the message you're conveying."}]
|
| 66 |
|