Spaces:
Build error
Build error
Update langgraph_agent.py
Browse files190 unmodified lines191192193194195196197194195196197198199200190 unmodified lines llm_with_tools = llm.bind_tools(tools)
def assistant(state: MessagesState): messages_to_send = [sys_msg] + state["messages"] llm_response = llm_with_tools.invoke(messages_to_send) print(f"LLM Raw Response: {llm_response}") return {"messages": [llm_response]} messages_to_send = [sys_msg] + state["messages"] # This line was moved right llm_response = llm_with_tools.invoke(messages_to_send) # This line was moved right print(f"LLM Raw Response: {llm_response}") # This line was moved right return {"messages": [llm_response]} # This line was moved right
builder = StateGraph(MessagesState) builder.add_node("assistant", assistant)langgraph_agent.py+4-4