OpenAI’s ChatGPT produced insults and swear words as it responded to tense human conflicts, a study has found.