Update app.py
Browse files
app.py
CHANGED
@@ -149,34 +149,34 @@ def log_to_qdrant(question: str, answer: str):
|
|
149 |
|
150 |
|
151 |
|
152 |
-
# Uncomment and fix the Gemini configuration
|
153 |
-
llm = ChatGoogleGenerativeAI(
|
154 |
-
|
155 |
-
temperature=0.1,
|
156 |
-
max_tokens=None,
|
157 |
-
timeout=None,
|
158 |
-
max_retries=3,
|
159 |
-
api_key=GEMINI,
|
160 |
-
stream=True,
|
161 |
-
)
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
# llm = ChatOpenAI(
|
167 |
-
# model="gemini-2.5-flash",
|
168 |
# temperature=0.1,
|
169 |
# max_tokens=None,
|
170 |
# timeout=None,
|
171 |
# max_retries=3,
|
172 |
-
# api_key=GEMINI
|
173 |
-
# # base_url="https://openrouter.ai/api/v1",
|
174 |
# stream=True,
|
175 |
-
# # api_key=CHUTES_KEY,
|
176 |
-
# base_url="https://generativelanguage.googleapis.com/v1",
|
177 |
-
|
178 |
# )
|
179 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
template = """
|
181 |
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.
|
182 |
|
|
|
149 |
|
150 |
|
151 |
|
152 |
+
# # Uncomment and fix the Gemini configuration
|
153 |
+
# llm = ChatGoogleGenerativeAI(
|
154 |
+
# model="gemini-2.5-flash", # Note: Check if this model exists
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
# temperature=0.1,
|
156 |
# max_tokens=None,
|
157 |
# timeout=None,
|
158 |
# max_retries=3,
|
159 |
+
# api_key=GEMINI,
|
|
|
160 |
# stream=True,
|
|
|
|
|
|
|
161 |
# )
|
162 |
|
163 |
+
|
164 |
+
|
165 |
+
|
166 |
+
llm = ChatOpenAI(
|
167 |
+
model="openrouter/cypher-alpha:free",
|
168 |
+
temperature=0.1,
|
169 |
+
max_tokens=None,
|
170 |
+
timeout=None,
|
171 |
+
max_retries=3,
|
172 |
+
api_key=GEMINI,# if you prefer to pass api key in directly instaed of using env vars
|
173 |
+
base_url="https://openrouter.ai/api/v1",
|
174 |
+
stream=True,
|
175 |
+
# api_key=CHUTES_KEY,
|
176 |
+
# base_url="https://generativelanguage.googleapis.com/v1",
|
177 |
+
|
178 |
+
)
|
179 |
+
|
180 |
template = """
|
181 |
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.
|
182 |
|