real_state_api_g / app /agents /real_state_agent.py
sanbatte's picture
api con gradio
781e8b6
raw
history blame contribute delete
458 Bytes
from langchain.agents.agent_types import AgentType
from langchain_experimental.agents.agent_toolkits import create_pandas_dataframe_agent
from langchain_openai import ChatOpenAI
from app.utils.data_preparation import load_data
df = load_data()
real_state_agent = create_pandas_dataframe_agent(
llm=ChatOpenAI(temperature=0, model="gpt-3.5-turbo-0613"),
df=df,
# prefix = prefix,
verbose=True,
agent_type=AgentType.OPENAI_FUNCTIONS,
)