rise-ai / agent /agent_main.py
markpeace's picture
basic chat is working again
224ff63
raw
history blame
459 Bytes
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