Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -151,14 +151,27 @@ def log_to_qdrant(question: str, answer: str):
|
|
| 151 |
except Exception as e:
|
| 152 |
logger.error(f"Failed to log to Qdrant: {e}")
|
| 153 |
|
| 154 |
-
llm = ChatGoogleGenerativeAI(
|
| 155 |
-
model="gemini-2.0-flash-thinking-exp-01-21",
|
| 156 |
-
temperature=0.3,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 157 |
max_tokens=None,
|
| 158 |
timeout=None,
|
| 159 |
max_retries=2,
|
| 160 |
-
api_key=
|
| 161 |
-
|
|
|
|
| 162 |
)
|
| 163 |
|
| 164 |
template = """
|
|
|
|
| 151 |
except Exception as e:
|
| 152 |
logger.error(f"Failed to log to Qdrant: {e}")
|
| 153 |
|
| 154 |
+
#llm = ChatGoogleGenerativeAI(
|
| 155 |
+
#model="gemini-2.0-flash-thinking-exp-01-21",
|
| 156 |
+
#temperature=0.3,
|
| 157 |
+
#max_tokens=None,
|
| 158 |
+
#timeout=None,
|
| 159 |
+
#max_retries=2,
|
| 160 |
+
#api_key=GEMINI,
|
| 161 |
+
#stream=True,
|
| 162 |
+
#)
|
| 163 |
+
|
| 164 |
+
|
| 165 |
+
|
| 166 |
+
llm = ChatOpenAI(
|
| 167 |
+
model="deepseek/deepseek-r1:free",
|
| 168 |
+
temperature=0,
|
| 169 |
max_tokens=None,
|
| 170 |
timeout=None,
|
| 171 |
max_retries=2,
|
| 172 |
+
api_key="...", # if you prefer to pass api key in directly instaed of using env vars
|
| 173 |
+
base_url="https://openrouter.ai/api/v1",
|
| 174 |
+
|
| 175 |
)
|
| 176 |
|
| 177 |
template = """
|