Spaces:
Sleeping
Sleeping
pwilczewski
commited on
Commit
·
5b69170
1
Parent(s):
f229ac4
added more output
Browse files
app.py
CHANGED
@@ -58,7 +58,8 @@ def create_agent(llm: ChatOpenAI, tools: list, task: str):
|
|
58 |
# AIMessage will have all kinds of metadata, so treat it all as HumanMessage I suppose?
|
59 |
def agent_node(state: AgentState, agent, name):
|
60 |
result = agent.invoke(state)
|
61 |
-
return {"messages": [HumanMessage(content=result["output"], name=name)]}
|
|
|
62 |
|
63 |
# I need to write the message to state here? or is that handled automatically?
|
64 |
def chain_node(state: AgentState, chain, name):
|
|
|
58 |
# AIMessage will have all kinds of metadata, so treat it all as HumanMessage I suppose?
|
59 |
def agent_node(state: AgentState, agent, name):
|
60 |
result = agent.invoke(state)
|
61 |
+
# return {"messages": [HumanMessage(content=result["output"], name=name)]}
|
62 |
+
return {"messages": [result]}
|
63 |
|
64 |
# I need to write the message to state here? or is that handled automatically?
|
65 |
def chain_node(state: AgentState, chain, name):
|