Spaces:
Running
Running
Upload 2 files
Browse files
main.py
CHANGED
@@ -770,7 +770,7 @@ def gemini_pro(item: GeminiPro):
|
|
770 |
if item.is_multi_chat:
|
771 |
selected_api_key = ASSISTANT_GOOGLE_API_KEYS or item.gemini_api_key
|
772 |
try:
|
773 |
-
gt = GeminiLatest(api_key=selected_api_key)
|
774 |
answer, gemini_chat = gt._get_response_gemini(item.query, item.gemini_chat)
|
775 |
return SuccessResponse(
|
776 |
status="True",
|
|
|
770 |
if item.is_multi_chat:
|
771 |
selected_api_key = ASSISTANT_GOOGLE_API_KEYS or item.gemini_api_key
|
772 |
try:
|
773 |
+
gt = GeminiLatest(api_key=selected_api_key, mongo_url=item.mongo_url, user_id=item.user_id)
|
774 |
answer, gemini_chat = gt._get_response_gemini(item.query, item.gemini_chat)
|
775 |
return SuccessResponse(
|
776 |
status="True",
|
models.py
CHANGED
@@ -72,6 +72,8 @@ class ChatgptCustom(BaseModel):
|
|
72 |
class GeminiPro(BaseModel):
|
73 |
query: str
|
74 |
bard_api_key: Optional[str] = None
|
|
|
|
|
75 |
gemini_api_key: Optional[str] = None
|
76 |
gemini_chat: Optional[list] = None
|
77 |
is_login: Optional[bool] = False
|
|
|
72 |
class GeminiPro(BaseModel):
|
73 |
query: str
|
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 |
gemini_chat: Optional[list] = None
|
79 |
is_login: Optional[bool] = False
|