add 30-minute financial data cache_2
Browse files
app.py
CHANGED
|
@@ -166,7 +166,7 @@ def chat_stream(
|
|
| 166 |
try:
|
| 167 |
access_token = request.access_token if request.access_token else SANDBOX_ACCESS_TOKEN
|
| 168 |
print(f"Using access token: {access_token[:20]}...", flush=True)
|
| 169 |
-
financial_context =
|
| 170 |
print(f"Financial context preview: {financial_context[:150]}", flush=True)
|
| 171 |
|
| 172 |
if financial_context == "BANK_REAUTH_REQUIRED":
|
|
|
|
| 166 |
try:
|
| 167 |
access_token = request.access_token if request.access_token else SANDBOX_ACCESS_TOKEN
|
| 168 |
print(f"Using access token: {access_token[:20]}...", flush=True)
|
| 169 |
+
financial_context = get_cached_financial_context(access_token, user["sub"])
|
| 170 |
print(f"Financial context preview: {financial_context[:150]}", flush=True)
|
| 171 |
|
| 172 |
if financial_context == "BANK_REAUTH_REQUIRED":
|