withMessages
Creates a copy of the current Prompt instance with updated messages.
Return
A new Prompt instance with the updated list of messages.
Parameters
newMessages
A list of Message instances that will replace the current messages in the Prompt.