Spaces:
Sleeping
Sleeping
was missing some rquirements
Browse files- __pycache__/agent_tools.cpython-311.pyc +0 -0
- app.py +4 -2
- requirements.txt +1 -0
__pycache__/agent_tools.cpython-311.pyc
ADDED
|
Binary file (9.82 kB). View file
|
|
|
app.py
CHANGED
|
@@ -27,8 +27,10 @@ chat_with_tools = llm.bind_tools(tools)
|
|
| 27 |
class MyAgent(TypedDict):
|
| 28 |
messages: Annotated[list[AnyMessage], add_messages]
|
| 29 |
|
|
|
|
|
|
|
| 30 |
def __init__(self):
|
| 31 |
-
print("
|
| 32 |
|
| 33 |
def __call__(self, question: str) -> str:
|
| 34 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
|
@@ -117,7 +119,7 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
|
|
| 117 |
|
| 118 |
# 1. Instantiate Agent ( modify this part to create your agent)
|
| 119 |
try:
|
| 120 |
-
agent =
|
| 121 |
except Exception as e:
|
| 122 |
print(f"Error instantiating agent: {e}")
|
| 123 |
return f"Error initializing agent: {e}", None
|
|
|
|
| 27 |
class MyAgent(TypedDict):
|
| 28 |
messages: Annotated[list[AnyMessage], add_messages]
|
| 29 |
|
| 30 |
+
|
| 31 |
+
class AgentWrapper:
|
| 32 |
def __init__(self):
|
| 33 |
+
print("AgentWrapper initialized.")
|
| 34 |
|
| 35 |
def __call__(self, question: str) -> str:
|
| 36 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
|
|
|
| 119 |
|
| 120 |
# 1. Instantiate Agent ( modify this part to create your agent)
|
| 121 |
try:
|
| 122 |
+
agent = AgentWrapper()
|
| 123 |
except Exception as e:
|
| 124 |
print(f"Error instantiating agent: {e}")
|
| 125 |
return f"Error initializing agent: {e}", None
|
requirements.txt
CHANGED
|
@@ -3,6 +3,7 @@ requests
|
|
| 3 |
langchain
|
| 4 |
langchain-openai
|
| 5 |
langchain-community
|
|
|
|
| 6 |
langchain-core
|
| 7 |
langgraph
|
| 8 |
openai
|
|
|
|
| 3 |
langchain
|
| 4 |
langchain-openai
|
| 5 |
langchain-community
|
| 6 |
+
langchain_huggingface
|
| 7 |
langchain-core
|
| 8 |
langgraph
|
| 9 |
openai
|