RL-GPT: Integrating Reinforcement Learning and Code-as-policy