INNER CODE UNIT · Python
process_exploratory
business-science/free-ai-tips · 015_ai_exploratory_copilot_dtale_integration/app.py:270
def process_exploratory(question: str, llm, data: pd.DataFrame) -> dict:
"""
Initializes and calls the EDA agent using the provided question and data.
Processes any returned artifacts (plots, dataframes, etc.) and returns a result dict.
"""
eda_agent = EDAToolsAgent(
llm,
invoke_react_agent_kwargs={"recursion_limit": 10},
)
question += " Don't return hyperlinks to files in the response."
eda_agent.invoke_agent(
user_instructions=question,
data_raw=data,
)
tool_calls = eda_agent.get_tool_calls()