President Carter revealed yesterday that he had tried and failed during the recent negotiations to obtain a public commitment from China that it will not use force against Taiwan.

Carter's statement, in response to a question at his news conference, was the first public acknowledgment of the Carter administration's bargaining position with Peking on the Taiwan question.

Although it had been reported last summer that Carter was seeking a clear commitment by Peking to resolve the Taiwan issue peacefully, Carter made no mention of this in announcing the normalization of relations with China Dec. 15. In briefings for reporters, high officials repeatedly refused to say whether this had been the U.S. position.

Acknowledging that such a commitment had been a U.S. goal, Carter added simply, "This was not possible to achieve." He said the final outcome was an arrangement that the United States would state unilaterally that it expects Taiwan's status to be settled peacefully, and that Chinese leaders would not contradict that statement.

Carter said that since the announcement of normalization, Vice Premier Teng Hsaio-ping and other Chinese leaders have made comments "that substantiate the statement that 1 have made."

The Dec. 15 official Chinese statement announcing the normalization of relations with the United States said that the method of reunifying Taiwan with China is "entirely China's internal affair." Teng said Jan. 5 that China has "taken notice" of the United States' wish that the Taiwan question be solved peacefully. He said China prefers a peaceful solution, but refused to rule out the use of military force.

Carter expressed satisfaction with the "very good outcome" of the negotiations with Peking, mentioning several Chinese concessions to the United States about the continuation of contacts with Taiwan.He called the normalization of diplomatic relations "one of the major achievements for peace in the world."

In a related matter, Carter defended his interpretation of a message from Soviet President Leonid Brezhnev Dec. 19 about the U.S. ties with China. Two days after Carter received the message and made his version public in an interview with Walter Cronkite of CBS, the Soviets made public their own version through Tass, the official nees agency. It is highly unusual for Moscow to report on private exchanges with foreign leaders.

Some U.S. diplomats believe that the Soviet leadership was offended that Carter seemed to be using Brezhnev's statement to support his policies on China. There has been speculation that the Kremlin's displeasure was a factor in the inability of the U.S. and Soviet Union to resolve their differences on a new strategic arms limitation treaty (SALT) in Geneva negotiations just before Christmas.

Carter had originally called the Brezhnev message "very positive" and said that Brezhnev saw the U.S. ties with China as a contribution to world peace. Carter did not at that time make clear -- as he did yesterday -- that while Brezhnev approved the establishment of Washington-Peking diplomatic relations as a normal thing, the Soviet leader also expressed concern that the links could be used as an anti-Moscow maneuver and that he placed the United States on notice that the Soviet Union will closely monitor developments between its two major rivals.

"We never intend to use our improved relationships with China against the Soviet Union or the relationships with the Soviet Union, which I hope to improve, as a factor to endanger or threaten China," Carter said. He added that Brezhev's message was "certainly constructive and positive" compared to what he had expected from Moscow about the China ties.

In response to another question, Carter said the United States has warned both the Soviet Union and Vietnam against permitting the conflict in Cambodia to spill over into neighboring Thailand.

"We are very interested in seeing the integrity of Thailand protected, the borders not endangered or even threatened by the insurgent troops from Vietnam in Cambodia," he said.

The warning to Vietnam about endangering Thailand was extended to the Soviet Union, he indicated, because the Soviets' support and supply the Vietnamese in the Cambodian conflict.

U.S. officials said the warnings had been expressed both at the United Nations and in diplomatic exchanges. So far there has been no major threat to Thai borders, they said, although on one occasion recently, Vietnamese aircraft dropped a load of bombs in Thai territory, evidently by mistake.