Bhagavad Gita: Chapter 18, Verse 75

व्यासप्रसादाच्छ्रुतवानेतद्गुह्यमहं परम् |
योगं योगेश्वरात्कृष्णात्साक्षात्कथयत: स्वयम् || 75||

vyāsa-prasādāch chhrutavān etad guhyam ahaṁ param
yogaṁ yogeśhvarāt kṛiṣhṇāt sākṣhāt kathayataḥ svayam

vyāsa-prasādātby the grace of Ved Vyas; śhrutavānhave heard; etatthis; guhyamsecret; ahamI; paramsupreme; yogamYog; yoga-īśhvarātfrom the Lod of Yog; kṛiṣhṇātfrom Shree Krishna; sākṣhātdirectly; kathayataḥspeaking; svayamhimself

vyasa-prasadach chhrutavan etad guhyam aham param
yogam yogeshvarat krishnat sakshat kathayatah svayam

Translation

BG 18.75: By the grace of Veda Vyas, I have heard this supreme and most secret Yog from the Lord of Yog, Shree Krishna Himself.

Commentary

Shree Krishna Dwaipayan Vyasadev, also known as Sage Ved Vyas, was the spiritual master of Sanjay. By the grace of his Guru, Sanjay had been blessed with the power of clairvoyance, to know all that transpired on the battleground of Kurukshetra while he sat in the royal palace of Hastinapur. Here, Sanjay acknowledges it was by his Guru’s mercy that he got the opportunity to hear the supreme science of Yog from the Lord of Yog himself, Shree Krishna.

Ved Vyas, the author of the Brahma Sūtras, the Puraṇas, the Mahabharat, etc. was a descension of God, and possessed all the clairvoyant powers himself. Thus, he not only heard the conversation between Shree Krishna and Arjun, but also the one between Sanjay and Dhritarasthra. Thereby, he included both conversations while compiling the Bhagavad Gita.