Update app.py
Browse files
app.py
CHANGED
|
@@ -471,7 +471,7 @@ def get_response_from_excel(query, model, context, num_calls=3, temperature=0.2)
|
|
| 471 |
|
| 472 |
logging.info("Finished generating response for Excel data")
|
| 473 |
|
| 474 |
-
def truncate_context(context, max_chars=
|
| 475 |
"""Truncate context to a maximum number of characters."""
|
| 476 |
if len(context) <= max_chars:
|
| 477 |
return context
|
|
|
|
| 471 |
|
| 472 |
logging.info("Finished generating response for Excel data")
|
| 473 |
|
| 474 |
+
def truncate_context(context, max_chars=16000):
|
| 475 |
"""Truncate context to a maximum number of characters."""
|
| 476 |
if len(context) <= max_chars:
|
| 477 |
return context
|