def Chain_Main_Agent(memory): from langchain_openai import ChatOpenAI from agent.prompt import prompt prompt=prompt[memory.isNew] llm = ChatOpenAI(model="gpt-3.5-turbo-0125", temperature=0) from agent.toolset import converted_tools llm_with_tools = llm.bind_functions(converted_tools) from agent.datastructures import parser chain_main_agent = ( prompt | llm_with_tools ) return chain_main_agent