Alpaca [1], perhaps. It's based on facebook's model (LLaMA) and its been trained on a conversational style, same as chat gpt. I don't know if it can produce code, though.
From what I can tell setting things up to train the model is easy. Then you have to generate the training data (can be done using GPT3's API), fine tune Alpaca, and then evaluate it.
Haven't done it myself but I believe you can find more info here [1]