I'd interpret the psalm Messianically.
For the director of music. To the tune of “Lilies.” Of the Sons of Korah. A maskil. A wedding song.
1 My heart is stirred by a noble theme
as I recite my verses for the king;
The psalm is a Jewish royal wedding song.
2 You are the most excellent of men
and your lips have been anointed with grace,
since God has blessed you forever.
Jesus claimed to be greater than King Solomon in Matthew 12:42
The Queen of the South will rise at the judgment with this generation and condemn it; for she came from the ends of the earth to listen to Solomon's wisdom, and now something greater than Solomon is here.
For the law was given through Moses; grace and truth came through Jesus Christ.
All spoke well of Him and marveled at the gracious words that came from His lips. "Isn't this the son of Joseph?" they asked.
There is strong evidence that the "You" in verse 2 refers to the Messiah.
You have loved righteousness and hated wickedness; Therefore God, Your God, has anointed you With the oil of joy above your companions.
Hebrews 1 makes it clear that Psalm 45:7 is messianic.
8 But about the Son he says,
“Your throne, O God, will last for ever and ever;
a scepter of justice will be the scepter of your kingdom.
9 You have loved righteousness and hated wickedness;
therefore God, your God, has set you above your companions
by anointing you with the oil of joy.”
Is God talking with God in Psalm 45:7?
Not exactly. The psalmist addresses the Son:
You [the Son] have loved righteousness and hated wickedness; Therefore God, Your God [the Father], has anointed you With the oil of joy above your companions.