The courtship of Jane Byrne heated up today, with President Carter playing the role of the wealthy new suitor and Sen. Edward M. Kennedy that of the long lost love.

Mayor Byrne played the part of the coy maiden, apparently betrothing herself to one while leaving room for a change of heart.

Speaking to more than 10,000 supporters at a dinner in the McCormick Place convention center here, the Chicago mayor lavished praise on Carter as the "savior of the nation's big cities," said the country would benefit from anothers four years of his leadership and, without mentioning Kennedy, warned of the perils of a fight for the Democratic presidental nomination.

"I am a Democrat interested in my party's future, interested in the welfare of America as well as Chicago, and I cannot pass up the opportunity to admonish those who would divide the Democratic Party in the national electing that they may reap the political wild wind," she said.

"I do think we can afford a national intraparty bloodbath at this crucial time. The times call for unity and discipline. It will be at our peril to flout the national political tradition that an incumbent deserves a second term upon reasonable performance and dedication to the national welfare."

But then Byrne added a suggestion that maybe, just maybe, she is not pledged to those principles forever.

"It would be premature and presumptuous of me tonight to say that I believe the Democratic ought to renominate our present leader for another four-year term," she said. "But as mayor of the great city of Chicago, the mid-America city of the '80s, I tell you that I will be a delegate to the Democratic National Convention in New York. If that convention were tonight, I would vote. . . to renominate our present leader for another four years."

It was close to an outright endorsement of Carter's renomination, but it left Byrne with a bit of an out.

What preceded the mayor's speech had the makings of a mini-soap opera, with Carter and Kennedy in the leading male roles.

Like a country squire wooing a working-class maiden, Carter came to Byrne's city tonight bearing reminders of what an alliance between them could mean to her and her family of Chicago Democrats.

Speaking after Bryne at the fundraising dinner, Carter recited a partial list of the millions in federal grants this city has received from his adminstration. And that is not the end of it, he went on, announcing an agreement to extend a federally supported jobs program and a decision that will allow the city to expand O'Hare International Airport on land now occupied by the Air Force.

Unknown to the president, his chief rival for Bryne's affection and the support of the Chicago Democrats she leads, beat him to the punch with a nostalgic reminder of days past.

While Carter was in Kansas City addressing a convention, Kennedy dispatched a telegram congratulating Byrne for her support of a local group seeking to preserve Chicago neighborhoods. "I just hope you remember," he added at the end of the message. "Who has loved you and Chicago longer."

Longer than whom the Massachusetts Democrat didn't say, nor did he have to. "I'll let you interpret it," his press secretary, Tom Southwick, said from Washington.

Earlier today, the object of all this affection was still playing hard to get. She acknowledged receipt of the telegram, but cautioned reporters against reading too much into it.

"No one can change the fact that I know Teddy," she said. "He's like a friend and I think it was very nice of him."

In a sence, Byrne invited this early frenzy of attention with a show of indecision.

She has longstanding connections with the Kennedy family, going back to 1960. But 20 years later, having bucked the political machine she once was a part of to become mayor of the nation's second-largest city, she is in need of all the help, financial and otherwise, that the administration in Washington is willing to provide.

Last week, with First Lady Rosalynn Carter standing at her side, Byrne was asked if she was supporting the president for reelection. "Yes, I am," she replied.

But by the next day, Byrne was having second thoughts, announcing that "I would have no reason not to support him at this time."

At stake in all this is more than a nod of approval from one politician toward another. Byrne is attempting to solidify her control of the Cook County Democratic organization once headed by Richard J. Daley, and is certain to be a major factor in next March's Illinois primary, one of the first outside Carter's native South and Kennedy's New England.

In his speech tonight, Carter generally steered clear of his intraparty dispute with Kennedy. However, in a veiled reference to the subject, he delivered the same message his aides have been sending to the Kennedy camp -- that it will be a long, hard fight.