Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -146,32 +146,32 @@ def log_to_qdrant(question: str, answer: str):
|
|
| 146 |
except Exception as e:
|
| 147 |
logger.error(f"Failed to log to Qdrant: {e}")
|
| 148 |
|
| 149 |
-
llm = ChatGoogleGenerativeAI(
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
)
|
| 158 |
|
| 159 |
|
| 160 |
|
| 161 |
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
#
|
| 170 |
-
|
| 171 |
-
#
|
| 172 |
-
|
| 173 |
|
| 174 |
-
|
| 175 |
|
| 176 |
template = """
|
| 177 |
Your Name is Maxwell , a specialized AI assistant for the Mawared HR System, designed to deliver accurate and contextually relevant support based solely on the provided context and chat history.
|
|
|
|
| 146 |
except Exception as e:
|
| 147 |
logger.error(f"Failed to log to Qdrant: {e}")
|
| 148 |
|
| 149 |
+
# llm = ChatGoogleGenerativeAI(
|
| 150 |
+
# model="gemini-2.5-flash",
|
| 151 |
+
# temperature=0.2,
|
| 152 |
+
# max_tokens=None,
|
| 153 |
+
# timeout=None,
|
| 154 |
+
# max_retries=2,
|
| 155 |
+
# api_key=GEMINI,
|
| 156 |
+
# stream=True,
|
| 157 |
+
# )
|
| 158 |
|
| 159 |
|
| 160 |
|
| 161 |
|
| 162 |
+
llm = ChatOpenAI(
|
| 163 |
+
model="gemini-2.5-flash",
|
| 164 |
+
temperature=0.1,
|
| 165 |
+
max_tokens=None,
|
| 166 |
+
timeout=None,
|
| 167 |
+
max_retries=3,
|
| 168 |
+
api_key=GEMINI,# if you prefer to pass api key in directly instaed of using env vars
|
| 169 |
+
# base_url="https://openrouter.ai/api/v1",
|
| 170 |
+
stream=True,
|
| 171 |
+
# api_key=CHUTES_KEY,
|
| 172 |
+
base_url="https://generativelanguage.googleapis.com/v1",
|
| 173 |
|
| 174 |
+
)
|
| 175 |
|
| 176 |
template = """
|
| 177 |
Your Name is Maxwell , a specialized AI assistant for the Mawared HR System, designed to deliver accurate and contextually relevant support based solely on the provided context and chat history.
|