OpenAI president Greg Brockman has described a heated 2017 meeting with Elon Musk over the billionaire's early attempt to control the artificial intelligence (AI) company.

Brockman, a co-founder of OpenAI and a defendant in Musk's lawsuit attempting to undo its transition to a for-profit business, told a jury in Oakland federal court that when he rejected a proposal for Musk to have more say in the company, Musk's mood abruptly changed.

"I actually thought he was going to hit me," Brockman said, referring to Musk.

The meeting ended shortly thereafter, Brockman said, with Musk announcing that he would start withholding funding from OpenAI, which he had been backing since its start in 2015.

Brockman's testimony comes during the second week of a month-long trial between Musk and OpenAI's key founder and chief executive Sam Altman.