Need help with responsive text box's

Hey yall I have a text box in a grou- - I am using chat GPT API and I want the text box to expand based on the output of CHAT GPT For example right now I am getting this in the text box

“the basics of color theory are…” But based on how long the output is I want the text box to get longer to accommodate that.

any tips?

Ideally In the future I want to be able to make it like a live chat help, so Ideally you would be able to scroll through message history (this part is less important for now)