Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -111,6 +111,8 @@ def search_chats_by_date(startDate: str = None, endDate: str = None, maxResults:
|
|
| 111 |
SELECT id, metadata, content
|
| 112 |
FROM vector_store
|
| 113 |
WHERE metadata->>'documentType' = 'chatAnalysis'
|
|
|
|
|
|
|
| 114 |
"""
|
| 115 |
params = []
|
| 116 |
if startDate not in (None, ""):
|
|
@@ -121,8 +123,6 @@ def search_chats_by_date(startDate: str = None, endDate: str = None, maxResults:
|
|
| 121 |
params.append(endDate)
|
| 122 |
query += " LIMIT %s"
|
| 123 |
params.append(maxResults)
|
| 124 |
-
print("[search_chats_by_date] 실행 쿼리:", query)
|
| 125 |
-
print("[search_chats_by_date] 파라미터:", params)
|
| 126 |
with conn.cursor() as cur:
|
| 127 |
cur.execute(query, tuple(params))
|
| 128 |
rows = cur.fetchall()
|
|
|
|
| 111 |
SELECT id, metadata, content
|
| 112 |
FROM vector_store
|
| 113 |
WHERE metadata->>'documentType' = 'chatAnalysis'
|
| 114 |
+
AND (metadata->>'startTime') IS NOT NULL
|
| 115 |
+
AND (metadata->>'startTime') <> ''
|
| 116 |
"""
|
| 117 |
params = []
|
| 118 |
if startDate not in (None, ""):
|
|
|
|
| 123 |
params.append(endDate)
|
| 124 |
query += " LIMIT %s"
|
| 125 |
params.append(maxResults)
|
|
|
|
|
|
|
| 126 |
with conn.cursor() as cur:
|
| 127 |
cur.execute(query, tuple(params))
|
| 128 |
rows = cur.fetchall()
|