US Treasury Secretary Janet Yellen testifies before the House Ways and Means Committee during a hearing on proposed fiscal year 2023 budget on Capitol Hill in Washington, June 8, 2022. (JOSE LUIS MAGANA / AP)

WASHINGTON – US Treasury Secretary Janet Yellen said on Thursday she did not expect the US economy to tip into a recession, but growth would "absolutely" slow down and gasoline prices were unlikely to fall anytime soon.

"I don't think we're (going to) have a recession. Consumer spending is very strong. Investment spending is solid," she told a New York Times Dealbook event.

READ MORE: Fed's inflation control dilemma telling sign of US' political malady

"I know people are very upset and rightly so about inflation, but there's nothing to suggest that a … recession is in the works."

Things can always happen that you don't expect. The world's very uncertain.

Janet Yellen, US Treasury Secretary

Yellen, who last week conceded she had been wrong about predicting inflation would be transitory, told the event she would not change US policy decisions if she could go back in time.

"I wouldn't do it differently," Yellen said, saying President Joe Biden's signature $1.9 trillion American Rescue Plan was needed to prevent a generation of Americans suffering from high unemployment rates.

"Things can always happen that you don't expect. The world's very uncertain," she said.

Combating inflation was President Joe Biden's top priority, Yellen said, adding she did not expect gasoline prices, which just reached $5 a gallon, to come down anytime soon.

She said American households were clearly concerned about surging pump prices, which played a key role in shaping consumer expectations, but it was "amazing" how pessimistic Americans were about the economy given the fact that the United States now had the strongest labor market since World War Two.

ALSO READ: US labor market keeps Fed on aggressive rate hike path

Biden had done "what he can do" to address high gasoline prices by directing an historic drawdown from the Strategic Petroleum Reserve, Yellen said. She added that US officials would also keep tightening sanctions aiming at punishing Russia and getting it to stop its special operation n Ukraine.

As the Federal Reserve tightened monetary policy to contain demand and bring inflation down, Yellen said she saw a path to a soft landing that would avoid a recession.