antonioschiro commited on
Commit
bf4d9ee
·
verified ·
1 Parent(s): 2f03527

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +2 -2
agent.py CHANGED
@@ -31,12 +31,12 @@ llm = ChatGroq(
31
  )
32
  llm_with_tools = llm.bind_tools(tools)
33
 
34
- async def ask_agent(agent_state: State):
35
  system_prompt = SystemMessage(
36
  content = text_prompt
37
  )
38
  query = agent_state["messages"][-1] # HumanMessage
39
- response = await llm_with_tools.ainvoke(query.content)
40
  return {"messages": [response]}
41
 
42
  graph_builder = StateGraph(State)
 
31
  )
32
  llm_with_tools = llm.bind_tools(tools)
33
 
34
+ def ask_agent(agent_state: State):
35
  system_prompt = SystemMessage(
36
  content = text_prompt
37
  )
38
  query = agent_state["messages"][-1] # HumanMessage
39
+ response = llm_with_tools.invoke(query.content)
40
  return {"messages": [response]}
41
 
42
  graph_builder = StateGraph(State)