AgentTuning: Enabling Generalized Agent Abilities for LLMs