Daemontatox commited on
Commit
adf5463
·
verified ·
1 Parent(s): 7edc4d9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -18
app.py CHANGED
@@ -146,33 +146,37 @@ 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
- # 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.
178
 
 
146
  except Exception as e:
147
  logger.error(f"Failed to log to Qdrant: {e}")
148
 
 
 
 
 
 
 
 
 
 
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="gemini-2.5-flash",
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