Spaces:
Sleeping
Sleeping
turning lists to a dictionary
Browse files
app.py
CHANGED
|
@@ -51,7 +51,7 @@ def respond(message, history):
|
|
| 51 |
"AI: Great question! The 50/30/20 rule states that you should spend 50% of your income on needs, 30% of your income on wants, and 20% of your income on investing. For example, if you make $4,000 each month, you should spend $2,000 on your needs, $1,200 on your wants, and $800 on investing. That way, you can set aside money to take care of yourself while still making progress towards saving up for the things that aren't as essential."}]
|
| 52 |
|
| 53 |
if history:
|
| 54 |
-
messages.extend(["role": h["role"], "content": h["content"] for h in history])
|
| 55 |
# helping grok to retain message history
|
| 56 |
|
| 57 |
topResults = getTopChunks(message, chunkEmbeddings, cleanedChunks)
|
|
|
|
| 51 |
"AI: Great question! The 50/30/20 rule states that you should spend 50% of your income on needs, 30% of your income on wants, and 20% of your income on investing. For example, if you make $4,000 each month, you should spend $2,000 on your needs, $1,200 on your wants, and $800 on investing. That way, you can set aside money to take care of yourself while still making progress towards saving up for the things that aren't as essential."}]
|
| 52 |
|
| 53 |
if history:
|
| 54 |
+
messages.extend([{"role": h["role"], "content": h["content"]} for h in history])
|
| 55 |
# helping grok to retain message history
|
| 56 |
|
| 57 |
topResults = getTopChunks(message, chunkEmbeddings, cleanedChunks)
|