Spaces:
Sleeping
Sleeping
axeronis commited on
Commit ·
e30a117
1
Parent(s): 82470e0
Fix: Add Gemini fallback for Railway rebuild phase
Browse files
backend/app/services/llm_client.py
CHANGED
|
@@ -1,4 +1,11 @@
|
|
| 1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
from typing import Optional, List, Dict, Any
|
| 3 |
from app.core.config import settings
|
| 4 |
import asyncio
|
|
|
|
| 1 |
+
try:
|
| 2 |
+
from openai import OpenAI
|
| 3 |
+
GROQ_AVAILABLE = True
|
| 4 |
+
except ImportError:
|
| 5 |
+
# Fallback to Gemini during migration/rebuild
|
| 6 |
+
import google.generativeai as genai
|
| 7 |
+
GROQ_AVAILABLE = False
|
| 8 |
+
|
| 9 |
from typing import Optional, List, Dict, Any
|
| 10 |
from app.core.config import settings
|
| 11 |
import asyncio
|