update generate_body_callback spec to use segment