INNER CODE UNIT · Python

last_tool_call

business-science/free-ai-tips · 014_ai_exploratory_copilot_app/app.py:248

        last_tool_call = tool_calls[-1]
        result["last_tool_call"] = last_tool_call
        tool_name = last_tool_call
        
        print(f"Tool Name: {tool_name}")
        
        if tool_name == "explain_data":
            result["explanation"] = ai_message
            
        elif tool_name == "describe_dataset":
            if artifacts and isinstance(artifacts, dict) and "describe_df" in artifacts:
                try:
                    df = pd.DataFrame(artifacts["describe_df"])
                    result["describe_df"] = df
                except Exception as e:
                    st.error(f"Error processing describe_dataset artifact: {e}")
                    
        elif tool_name == "visualize_missing":

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…