Code Generation Using ChatGPT: Optimizing Language Models for Dialogue