Spaces:
Running
Running
Update document_generator_v2.py
Browse files- document_generator_v2.py +2 -1
document_generator_v2.py
CHANGED
|
@@ -623,6 +623,7 @@ async def generate_document_outline_endpoint(
|
|
| 623 |
documents_list = await load_documents(documents)
|
| 624 |
# Store the documents_list in the cache
|
| 625 |
docs_cache_key = f"documents_list_{conversation_id}"
|
|
|
|
| 626 |
await FastAPICache.get_backend().set(docs_cache_key, documents_list, expire=3600) # Cache for 1 hour
|
| 627 |
|
| 628 |
# Generate document outline
|
|
@@ -630,7 +631,7 @@ async def generate_document_outline_endpoint(
|
|
| 630 |
query,
|
| 631 |
template,
|
| 632 |
image_context=image_context,
|
| 633 |
-
documents_context=documents_list
|
| 634 |
)
|
| 635 |
|
| 636 |
if json_document is None:
|
|
|
|
| 623 |
documents_list = await load_documents(documents)
|
| 624 |
# Store the documents_list in the cache
|
| 625 |
docs_cache_key = f"documents_list_{conversation_id}"
|
| 626 |
+
print("saving document as cache key:"f"documents_list_{conversation_id}")
|
| 627 |
await FastAPICache.get_backend().set(docs_cache_key, documents_list, expire=3600) # Cache for 1 hour
|
| 628 |
|
| 629 |
# Generate document outline
|
|
|
|
| 631 |
query,
|
| 632 |
template,
|
| 633 |
image_context=image_context,
|
| 634 |
+
# documents_context=documents_list
|
| 635 |
)
|
| 636 |
|
| 637 |
if json_document is None:
|