Indian Prime Minister Indira Gandhi appeared poised tonight for a significant shake-up of her government and the leadership of her ruling Congress (I) Party in the wake of political setbacks in two southern Indian states earlier this month.

At the prime minister's request, four of the five general secretaries of the party in the capital submitted their resignations in order to give Gandhi a free hand in reorganizing the leadership.

Gandhi appointed a new "working president" of the party and said that she was considering changes in her 59-member council of ministers.

When asked about persistant press reports that some ministers had already offered their resignations at her behest, Gandhi smiled and told reporters, "They the resignations haven't reached me so far."

Gandhi appointed Kamalapati Tripathi, an old-guard Congress party workhorse for more than half a century, as the party's new "working president."

A minister in Gandhi's Cabinet told United Press International that 54 government ministers, including the entire Cabinet, have resigned. "The ministers submitted their resignation letters late Thursday night on a directive from the prime minister," the minister said, asking not to be identified.

The resignations include the 19 Cabinet ministers, other ministers of state and their deputy ministers, leaving India without ministers in foreign affairs, defense, finance, home affairs, information and broadcasting.

Gandhi's action, coupled with the reported resignations of ministers, touched off speculation that the prime minister was about to impose a uniquely Indian political rite of exorcism called the "Kamaraj Plan."

Named after a former chief minister of Madras state, the process seeks to revitalize the party by providing for senior government officials to resign from comfortable patronage posts to take full-time party organizational work.

The Kamaraj process was initiated in 1963 by then-prime minister Jawaharlal Nehru--Gandhi's father--to counter humiliating personal political defeats in by-elections the previous spring and the embarrassment of a border war with China.

Nehru, whose own offer to resign was rejected by the party, ultimately accepted the resignations of six Cabinet ministers, including that of Morarji Desai. Desai later charged that the imposed resignations of ministers was designed not so much to revitalize the Congress Party as it was intended to remove critics of Nehru's socialist program and pave the way for succession by his daughter.

Desai subsequently became prime minister for the opposition Janata Party after Gandhi's ouster in 1977.

The most recent political changes come three weeks after Gandhi's party suffered embarrassing defeats in legislative elections in the southern Indian states of Andhra Pradesh and Karnataka.

It was the first time that Congress (I)--the I stands for Indira--had been defeated in either of the states.

In Andhra Pradesh, Gandhi put her own political fortunes--and those of her son and heir apparent, Rajiv--on the line, campaigning energetically against a politically inexperienced movie idol, N.T. Rama Rao, whose Telegu Nation regional opposition party defeated Congress (I) by a three-to-one margin.

The defeat in Karnataka by another regional party was interpreted as a repudiation of Gandhi's attempts to impose central authority on distant states, as well as a rebellion against inept and often corrupt ministers and assemblymen who attained their positions by virtue of loyalty to the prime minister.

Although Gandhi's party still rules 15 of India's 22 states and enjoys a two-thirds majority in Parliament, the two southern elections were viewed as a bellwether to determine to what extent the prime minister is losing her grip in the south.

Similarly, local elections next month in the union territory of Delhi and in the far northeastern state of Assam will provide a new measure of Congress (I) strength in northern India. Gandhi is expected to complete her party and government reshuffling before the Feb. 4 Delhi municipal council elections, for which Congress (I) has been campaigning vigorously.

Informed political analysts here said they also expected changes of some state chief ministers, who are roughly equivalent in function to governors or chief operating officers. The most likely changes would occur in Maharashtra and Bihar states, where chief ministers Babhasaheb Bhosale and Jaganath Mishra are both under clouds of party infighting and charges of ineptness and corruption.

Tripathi, 77, today told reporters that Bhosale would be replaced, but he could not name a possible successor.

Filing important Cabinet and sub-Cabinet posts is expected to be Gandhi's biggest challenge if she decides on a major government overhaul instead of the kind of cosmetic changes she has made from time to time in the past.

It is thought unlikely that she would fire key Cabinet ministers with responsibility for finance and foreign affairs at a time of budget drafting and the impending summit conference here of the Nonaligned Movement.

More vulnerable are ministers of state and deputy ministers who could be given a face-saving option of returning to the political trenches for the sake of the party in exchange for providing an eye-catching appearance of reform just a week before the crucial Delhi elections.