Spaces:
Sleeping
Sleeping
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -27,6 +27,7 @@ from langchain_groq import ChatGroq
|
|
| 27 |
from langchain_community.vectorstores import SupabaseVectorStore
|
| 28 |
from langchain.tools.retriever import create_retriever_tool
|
| 29 |
from supabase.client import Client, create_client
|
|
|
|
| 30 |
|
| 31 |
HUGGINGFACEHUB_API_TOKEN = getenv("HUGGINGFACEHUB_API_TOKEN")
|
| 32 |
SUPABASE_URL = os.environ.get("SUPABASE_URL")
|
|
@@ -71,6 +72,7 @@ def simple_graph():
|
|
| 71 |
## Defining our nodes
|
| 72 |
def assistant(state: MessagesState):
|
| 73 |
"""Assistant node"""
|
|
|
|
| 74 |
return {"messages": [chat_with_tools.invoke([sys_msg] + state["messages"])]}
|
| 75 |
|
| 76 |
# def retriever(state: MessagesState):
|
|
|
|
| 27 |
from langchain_community.vectorstores import SupabaseVectorStore
|
| 28 |
from langchain.tools.retriever import create_retriever_tool
|
| 29 |
from supabase.client import Client, create_client
|
| 30 |
+
import time
|
| 31 |
|
| 32 |
HUGGINGFACEHUB_API_TOKEN = getenv("HUGGINGFACEHUB_API_TOKEN")
|
| 33 |
SUPABASE_URL = os.environ.get("SUPABASE_URL")
|
|
|
|
| 72 |
## Defining our nodes
|
| 73 |
def assistant(state: MessagesState):
|
| 74 |
"""Assistant node"""
|
| 75 |
+
time.sleep(45)
|
| 76 |
return {"messages": [chat_with_tools.invoke([sys_msg] + state["messages"])]}
|
| 77 |
|
| 78 |
# def retriever(state: MessagesState):
|