LogicGoInfotechSpaces commited on
Commit
0d2e411
·
1 Parent(s): 3220e2a

Fix deprecation warning and MongoDB conflict error

Browse files

- Migrate from deprecated google.generativeai to google.genai package
- Remove google-generativeai from requirements.txt (using google-genai instead)
- Fix MongoDB conflict: Remove updatedAt from \ to prevent conflict with \
- Fixes 'Updating the path updatedAt would create a conflict' error in admin media click logging

Files changed (3) hide show
  1. api/main.py +0 -1
  2. requirements.txt +0 -1
  3. src/core.py +1 -1
api/main.py CHANGED
@@ -409,7 +409,6 @@ def log_media_click(user_id: Optional[str], category_id: Optional[str]) -> None:
409
  }
410
  ],
411
  "createdAt": now,
412
- "updatedAt": now,
413
  "ai_edit_daily_count": daily_for_new,
414
  },
415
  "$inc": {"ai_edit_complete": 1}, # Increment to 1 on first use
 
409
  }
410
  ],
411
  "createdAt": now,
 
412
  "ai_edit_daily_count": daily_for_new,
413
  },
414
  "$inc": {"ai_edit_complete": 1}, # Increment to 1 on first use
requirements.txt CHANGED
@@ -2,7 +2,6 @@ fastapi
2
  uvicorn[standard]
3
  python-multipart
4
  google-genai>=1.38.0
5
- google-generativeai
6
  python-dotenv
7
  numpy
8
  opencv-python-headless
 
2
  uvicorn[standard]
3
  python-multipart
4
  google-genai>=1.38.0
 
5
  python-dotenv
6
  numpy
7
  opencv-python-headless
src/core.py CHANGED
@@ -14,7 +14,7 @@ import base64
14
  import cv2
15
  import numpy as np
16
  from PIL import Image
17
- import google.generativeai as genai
18
 
19
  log = logging.getLogger(__name__)
20
 
 
14
  import cv2
15
  import numpy as np
16
  from PIL import Image
17
+ import google.genai as genai
18
 
19
  log = logging.getLogger(__name__)
20