The hack took place as OpenAI tested the capabilities of a pair of its AI models, the company said in a statement.