Skip to content

Commit

Permalink
Feat: added response.replaces
Browse files Browse the repository at this point in the history
  • Loading branch information
EldarAlvik committed Nov 7, 2024
1 parent 238b2ae commit ef1d363
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/noder.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ def jarvis_agent(state: GraphState):
chain = prompt | ToolsAgent.agent | StrOutputParser()
response = chain.invoke({
"messages": state["messages"], "data": state.get("data", {})})
response.replace("'", "")
response.replace('"', '')
return {"tool_decision": response}

def tool_agent_decider(state: GraphState):
Expand Down Expand Up @@ -69,6 +71,8 @@ def tool_agent_decider(state: GraphState):
"calendar_tools": calendar_based_tools(),
"other_tools": get_other_tools()
})
response.replace("'", "")
response.replace('"', '')
return {"agent_decision": [response]}

def router(state: GraphState) -> Literal["generate", "use_tool"]:
Expand Down Expand Up @@ -154,6 +158,8 @@ def calendar_desicion_agent(state: GraphState):
chain = prompt | ToolsAgent.agent | StrOutputParser()
response = chain.invoke({
"messages": state["messages"], "data": state.get("data", {})})
response.replace("'", "")
response.replace('"', '')
return {"calendar_decision": response}

def calendar_tool_decider(state: GraphState):
Expand Down

0 comments on commit ef1d363

Please sign in to comment.