randydev commited on
Commit
70b562d
1 Parent(s): 48b87b0

Upload 2 files

Browse files
Files changed (2) hide show
  1. main.py +7 -2
  2. models.py +1 -0
main.py CHANGED
@@ -761,8 +761,13 @@ def gemini_pro(item: GeminiPro):
761
  if item.is_multi_chat:
762
  selected_api_key = ASSISTANT_GOOGLE_API_KEYS or item.gemini_api_key
763
  try:
764
- gt = GeminiLatest(api_key=selected_api_key, mongo_url=item.mongo_url, user_id=item.user_id)
765
- answer, gemini_chat = gt._GeminiLatest__get_response_gemini(item.query)
 
 
 
 
 
766
  return SuccessResponse(
767
  status="True",
768
  randydev={
 
761
  if item.is_multi_chat:
762
  selected_api_key = ASSISTANT_GOOGLE_API_KEYS or item.gemini_api_key
763
  try:
764
+ geni = GeminiLatest(
765
+ api_key=selected_api_key,
766
+ mongo_url=item.mongo_url,
767
+ version=item.version,
768
+ user_id=item.user_id
769
+ )
770
+ answer, gemini_chat = geni._GeminiLatest__get_response_gemini(item.query)
771
  return SuccessResponse(
772
  status="True",
773
  randydev={
models.py CHANGED
@@ -74,6 +74,7 @@ class GeminiPro(BaseModel):
74
  bard_api_key: Optional[str] = None
75
  mongo_url: Optional[str] = None
76
  user_id: Optional[int] = None
 
77
  gemini_api_key: Optional[str] = None
78
  is_login: Optional[bool] = False
79
  is_multi_chat: Optional[bool] = False
 
74
  bard_api_key: Optional[str] = None
75
  mongo_url: Optional[str] = None
76
  user_id: Optional[int] = None
77
+ version: Optional[str] = "v1"
78
  gemini_api_key: Optional[str] = None
79
  is_login: Optional[bool] = False
80
  is_multi_chat: Optional[bool] = False