Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -33,14 +33,14 @@ llm = ChatGoogleGenerativeAI(
|
|
33 |
llm_with_tools = llm.bind_tools(toolset)
|
34 |
|
35 |
sys_prompt_file = open("sys_prompt.txt")
|
36 |
-
|
37 |
|
38 |
class AgentState(TypedDict):
|
39 |
messages: Annotated[list[AnyMessage], add_messages]
|
40 |
|
41 |
def assistant(state: AgentState):
|
42 |
return {
|
43 |
-
"messages": [llm_with_tools.invoke(
|
44 |
}
|
45 |
|
46 |
builder = StateGraph(AgentState)
|
@@ -196,7 +196,7 @@ def run_and_submit_one( profile: gr.OAuthProfile | None):
|
|
196 |
|
197 |
# 1. Instantiate Agent ( modify this part to create your agent)
|
198 |
try:
|
199 |
-
agent =
|
200 |
except Exception as e:
|
201 |
print(f"Error instantiating agent: {e}")
|
202 |
return f"Error initializing agent: {e}", None
|
|
|
33 |
llm_with_tools = llm.bind_tools(toolset)
|
34 |
|
35 |
sys_prompt_file = open("sys_prompt.txt")
|
36 |
+
SYSTEM_PROMPT = sys_prompt_file.read()
|
37 |
|
38 |
class AgentState(TypedDict):
|
39 |
messages: Annotated[list[AnyMessage], add_messages]
|
40 |
|
41 |
def assistant(state: AgentState):
|
42 |
return {
|
43 |
+
"messages": [llm_with_tools.invoke(state["messages"])],
|
44 |
}
|
45 |
|
46 |
builder = StateGraph(AgentState)
|
|
|
196 |
|
197 |
# 1. Instantiate Agent ( modify this part to create your agent)
|
198 |
try:
|
199 |
+
agent = gaia_agent
|
200 |
except Exception as e:
|
201 |
print(f"Error instantiating agent: {e}")
|
202 |
return f"Error initializing agent: {e}", None
|