Spaces:
Sleeping
Sleeping
Commit
·
822cf1e
1
Parent(s):
e2721b4
next
Browse files
api/routers/analytics_chatbot.py
CHANGED
|
@@ -51,10 +51,10 @@ def get_analytics(request: AnalyticsChatRequest):
|
|
| 51 |
response_to_cache['response'] = result['response']
|
| 52 |
response_to_cache['endpoint'] = result['endpoint']
|
| 53 |
|
| 54 |
-
if request.image_base64 and not response_to_cache.get('description'):
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
|
| 59 |
redis_client.set(cache_key, json.dumps(response_to_cache), ex=3000)
|
| 60 |
return response_to_cache
|
|
|
|
| 51 |
response_to_cache['response'] = result['response']
|
| 52 |
response_to_cache['endpoint'] = result['endpoint']
|
| 53 |
|
| 54 |
+
# if request.image_base64 and not response_to_cache.get('description'):
|
| 55 |
+
# description = generate_analytics_description(user_query, request.image_base64)
|
| 56 |
+
# if description is not None:
|
| 57 |
+
# response_to_cache['description'] = description
|
| 58 |
|
| 59 |
redis_client.set(cache_key, json.dumps(response_to_cache), ex=3000)
|
| 60 |
return response_to_cache
|
api/schemas/analytics_chatbot.py
CHANGED
|
@@ -3,4 +3,4 @@ from typing import Optional
|
|
| 3 |
|
| 4 |
class AnalyticsChatRequest(BaseModel):
|
| 5 |
msg: str
|
| 6 |
-
image_base64:Optional[str] = None
|
|
|
|
| 3 |
|
| 4 |
class AnalyticsChatRequest(BaseModel):
|
| 5 |
msg: str
|
| 6 |
+
# image_base64:Optional[str] = None
|