Upload main.py
Browse files
main.py
CHANGED
|
@@ -189,7 +189,7 @@ async def get_gemini_client():
|
|
| 189 |
if gemini_client is None:
|
| 190 |
try:
|
| 191 |
gemini_client = GeminiClient(SECURE_1PSID, SECURE_1PSIDTS)
|
| 192 |
-
await gemini_client.init(timeout=
|
| 193 |
except Exception as e:
|
| 194 |
logger.error(f"Failed to initialize Gemini client: {str(e)}")
|
| 195 |
raise HTTPException(
|
|
@@ -206,7 +206,7 @@ async def create_chat_completion(request: ChatCompletionRequest):
|
|
| 206 |
global gemini_client
|
| 207 |
if gemini_client is None:
|
| 208 |
gemini_client = GeminiClient(SECURE_1PSID, SECURE_1PSIDTS)
|
| 209 |
-
await gemini_client.init(timeout=
|
| 210 |
logger.info("Gemini client initialized successfully")
|
| 211 |
|
| 212 |
# 转换消息为对话格式
|
|
|
|
| 189 |
if gemini_client is None:
|
| 190 |
try:
|
| 191 |
gemini_client = GeminiClient(SECURE_1PSID, SECURE_1PSIDTS)
|
| 192 |
+
await gemini_client.init(timeout=300)
|
| 193 |
except Exception as e:
|
| 194 |
logger.error(f"Failed to initialize Gemini client: {str(e)}")
|
| 195 |
raise HTTPException(
|
|
|
|
| 206 |
global gemini_client
|
| 207 |
if gemini_client is None:
|
| 208 |
gemini_client = GeminiClient(SECURE_1PSID, SECURE_1PSIDTS)
|
| 209 |
+
await gemini_client.init(timeout=300)
|
| 210 |
logger.info("Gemini client initialized successfully")
|
| 211 |
|
| 212 |
# 转换消息为对话格式
|