Socialist President Francois Mitterrand today summoned conservative leader Jacques Chirac for talks on forming a new French government following a narrow right-wing election victory, but Chirac refused to say immediately if he would accept the post of prime minister.

French political commentators immediately speculated that there were differences between the two men over the composition of the future government and the way in which it will set about implementing its electoral program.

A statement issued by the Elysee presidential palace after the 135-minute interview said: "The president of the republic called Mr. Jacques Chirac to take part in general discussions on the formation of a new government. Mr. Chirac will give his reply to the president of the republic in the shortest possible time."

A similar statement was issued by Chirac, whose neo-Gaullist Rally for a Republic forms the largest component in the new right-wing majority in the National Assembly. Aides to Chirac, who is mayor of Paris, later said he was likely to take up to 48 hours before giving a firm reply.

Today's meeting between Mitterrand and Chirac was seen as the first test of what has become known in France as "cohabitation." the unprecedented sharing of power between political opponents. Until now, all French Fifth Republic presidents since the first, Gen. Charles de Gaulle, have been able to rely on majority support in the assembly.

In a television broadcast last night, Mitterrand said he was willing to allow a right-wing government to implement its own policies. But he also made it clear that he is determined to keep his constitutional powers intact and continue to play an important political role, particularly in foreign policy.

Quoting official sources, the French news agency Agence France-Presse tonight said Mitterrand had not formally offered the post of prime minister, until now held by Socialist Laurent Fabius to Chirac. It was widely assumed, however, that Chirac will get the post if the two men can reach agreement on ground rules for cooperation.

Following his talks at the Elysee, Chirac tonight met with other leading members from his party and its center-right electoral ally, the Union for French Democracy. The coalition of the two parties has a three-seat majority in the assembly with the support of independent right-wing deputies.

After the meeting broke up late tonight, President Jean Lecanuet of the Union for French Democracy said that both parties agreed that Chirac should try to form a government.

In a joint statement yesterday, the two parties had insisted that anyone approached by Mitterrand to form a government should first make sure that he had support from the new majority. This was widely interpreted as an attempt to forestall the ambitions of other possible right-wing candidates, such as former prime minister Jacques Chaban-Delmas and former president Valery Giscard d'Estaing.

The main advantage to Mitterrand of appointing Chirac prime minister is that it is an incontestable choice. It enables the president to present himself to public opinion as the guarantor of national unity, a valuable asset if the cohabitation experiment later breaks down.

Political analysts here say Mitterrand's long-term strategy is to put his Socialist Party in a good position to win the next presidential election which is due in 1988. By pushing Chirac forward as prime minister during what is likely to be a difficult political period, Mitterrand is effectively playing him off against another right-wing candidate for the presidency, former prime minister Raymond Barre.

For his part, Chirac is likely to insist on being given as free a hand as possible by Mitterrand if he accepts the post of prime minister. The key point in the constitution as far as he is concerned is Article 20, which states that "the government decides and directs the policy of the nation [and] has at its disposal the administration and the armed forces."

Chirac aides tonight suggested that today's interview at the Elysee palace was devoted largely to a discussion of the ground rules for "cohabitation." But there was also speculation that Mitterrand wanted to make sure that the new government includes ministers willing to cooperate with him.

According to the constitution, ministers are formally appointed by the president "on the proposal of the prime minister." The sensitive posts are considered to be the ministers of foreign affairs and defense, areas in which Mitterrand has expressed a special interest, and the minister of interior, who is responsible for all matters dealing with internal security.

Mitterrand is also in a position to make it more difficult for the new majority to bypass parliamentary procedures and govern by decree, a frequent tactic of previous governments. The constitution states that government decrees have to be signed by the president.

Before his interview with Mitterrand, Chirac addressed his party's new members in the National Assembly at a special meeting. He urged them to display "total unity" with the other right-wing parties to allow the new government to survive with its slim majority.