Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,15 +1,11 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
import os
|
| 3 |
from langchain_groq import ChatGroq
|
| 4 |
-
|
| 5 |
-
# 1. Update these lines for the 2026 library structure
|
| 6 |
-
from langchain.agents.output_parsers import ToolsAgentOutputParser
|
| 7 |
-
from langchain.agents.format_scratchpad import format_to_openai_tool_messages
|
| 8 |
-
from langchain.agents import AgentExecutor
|
| 9 |
-
# Try this specific import for the creator function:
|
| 10 |
-
from langchain.agents.agent import create_tool_calling_agent
|
| 11 |
from langchain_core.tools import tool
|
| 12 |
from langchain_core.prompts import ChatPromptTemplate
|
|
|
|
|
|
|
| 13 |
from streamlit_js_eval import get_geolocation
|
| 14 |
|
| 15 |
# --- 1. Tool Definition ---
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
import os
|
| 3 |
from langchain_groq import ChatGroq
|
| 4 |
+
from langchain.agents import AgentExecutor, create_tool_calling_agent
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
from langchain_core.tools import tool
|
| 6 |
from langchain_core.prompts import ChatPromptTemplate
|
| 7 |
+
# These are the standard modern locations
|
| 8 |
+
from langchain_core.output_parsers import JsonOutputParser
|
| 9 |
from streamlit_js_eval import get_geolocation
|
| 10 |
|
| 11 |
# --- 1. Tool Definition ---
|