Spaces:
Configuration error
Configuration error
Include HuggingFace pkg
Browse files- agent.py +6 -4
- requirements.txt +1 -0
agent.py
CHANGED
|
@@ -1,12 +1,14 @@
|
|
| 1 |
-
|
| 2 |
-
from langchain_community.llms import HuggingFaceEndpoint
|
| 3 |
-
|
| 4 |
-
# --- Custom Tools ---
|
| 5 |
from langchain_community.tools.tavily_search import TavilySearchResults
|
| 6 |
from langchain_core.messages import AIMessage, HumanMessage, SystemMessage
|
| 7 |
from langchain_core.runnables import RunnableLambda
|
| 8 |
from langchain_core.tools import tool
|
| 9 |
from langchain_experimental.tools.python.tool import PythonREPLTool
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
from langgraph.graph import END, START, MessagesState, StateGraph
|
| 11 |
from langgraph.graph.message import add_messages
|
| 12 |
from langgraph.prebuilt import ToolNode, tools_condition
|
|
|
|
| 1 |
+
# --- Langchain / Langraph ---
|
|
|
|
|
|
|
|
|
|
| 2 |
from langchain_community.tools.tavily_search import TavilySearchResults
|
| 3 |
from langchain_core.messages import AIMessage, HumanMessage, SystemMessage
|
| 4 |
from langchain_core.runnables import RunnableLambda
|
| 5 |
from langchain_core.tools import tool
|
| 6 |
from langchain_experimental.tools.python.tool import PythonREPLTool
|
| 7 |
+
from langchain_huggingface import import (
|
| 8 |
+
ChatHuggingFace,
|
| 9 |
+
HuggingFaceEndpoint,
|
| 10 |
+
HuggingFaceEmbeddings,
|
| 11 |
+
)
|
| 12 |
from langgraph.graph import END, START, MessagesState, StateGraph
|
| 13 |
from langgraph.graph.message import add_messages
|
| 14 |
from langgraph.prebuilt import ToolNode, tools_condition
|
requirements.txt
CHANGED
|
@@ -3,6 +3,7 @@ requests
|
|
| 3 |
langchain
|
| 4 |
langchain-core
|
| 5 |
langchain-community
|
|
|
|
| 6 |
langchain-experimental
|
| 7 |
langchain-tavily
|
| 8 |
langgraph
|
|
|
|
| 3 |
langchain
|
| 4 |
langchain-core
|
| 5 |
langchain-community
|
| 6 |
+
langchain_huggingface
|
| 7 |
langchain-experimental
|
| 8 |
langchain-tavily
|
| 9 |
langgraph
|