The text is ambiguous.
And this is the point of almost all that trinitarianism relies on; The more ambiguous the text, the more trinitarians emotionally and doctrinally invest in it being taken a certain way. This is done precisely because the explicit text supporting the doctrine is nonexistent.
Because the text is not explicit, one cannot rule out one possibility or another.
However, one thing is for sure; YHWH is not talking to himself. In verse 4, is the first use of 1,000's of singular pronoun's that are used for YHWH;
God saw that the light was beautiful and good, and He separated the light from the darkness. So, it is extreme exegesis to subordinate explicit text to ambiguous text to fit trinitarian doctrine.
I can speculate like anyone else. And because I am so demanding that others answer questions
, I will speculate an answer. God is talking to other Elohim, other heavenly beings, such as angels. While we know that man was created on Day 6, the text is less than ambiguous but silent on when Angels and other Elohim were created. One can infer he created them after v1, before Day 1.
V1 is written in the past tense; God
created the heavens and the Earth. The rest of the narrative details the creation of Earth, often more generally taken to be the physical universe we are in outside of heaven. One can infer from the order that the heavens were created before the Earth. Also, take note the plural of heaven
s.
The text is silent on the order and magnitude of time to create the heavens.
https://christianity.stackexchange....were-on-hand-to-witness-the-earth-being-creat
I hope this answers your question.