Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -216,11 +216,11 @@ if st.session_state.get('auth_status', False):
|
|
| 216 |
if "Groq" in current_provider:
|
| 217 |
llm = ChatGroq(api_key=current_key, temperature=0, model_name="llama-3.3-70b-versatile")
|
| 218 |
else:
|
| 219 |
-
# Use 'gemini-
|
| 220 |
llm = ChatGoogleGenerativeAI(
|
| 221 |
google_api_key=current_key,
|
| 222 |
temperature=0,
|
| 223 |
-
model="gemini-
|
| 224 |
transport="rest"
|
| 225 |
)
|
| 226 |
|
|
@@ -243,7 +243,7 @@ if st.session_state.get('auth_status', False):
|
|
| 243 |
MessagesPlaceholder(variable_name="agent_scratchpad"),
|
| 244 |
])
|
| 245 |
|
| 246 |
-
agent_executor = AgentExecutor(agent=create_tool_calling_agent(llm, tools, prompt), tools=tools, verbose=True, return_intermediate_steps=True)
|
| 247 |
|
| 248 |
# --- INPUT UI ---
|
| 249 |
col1, col2 = st.columns([1, 2])
|
|
|
|
| 216 |
if "Groq" in current_provider:
|
| 217 |
llm = ChatGroq(api_key=current_key, temperature=0, model_name="llama-3.3-70b-versatile")
|
| 218 |
else:
|
| 219 |
+
# Use 'gemini-1.5-flash' and force 'rest' transport
|
| 220 |
llm = ChatGoogleGenerativeAI(
|
| 221 |
google_api_key=current_key,
|
| 222 |
temperature=0,
|
| 223 |
+
model="gemini-1.5-flash",
|
| 224 |
transport="rest"
|
| 225 |
)
|
| 226 |
|
|
|
|
| 243 |
MessagesPlaceholder(variable_name="agent_scratchpad"),
|
| 244 |
])
|
| 245 |
|
| 246 |
+
agent_executor = AgentExecutor(agent=create_tool_calling_agent(llm, tools, prompt), tools=tools, verbose=True, return_intermediate_steps=True, handle_parsing_errors=True)
|
| 247 |
|
| 248 |
# --- INPUT UI ---
|
| 249 |
col1, col2 = st.columns([1, 2])
|