Abdullah bin Abbas reported,

The Prophet ﷺ embraced me to his chest and said, "O Allah, teach him wisdom."Abu Muamar narrated to us, Abd al-Warith narrated to us, and he said, "Teach him the Book."Musa narrated to us, Wahib narrated to us, from Khalid, the like of it.Wisdom here means soundness of judgment in matters other than prophethood.

Bukhari 3756

Sahih

حدثنا مسدد حدثنا عبد الوارث عن خالد عن عكرمة

عن ابن عباس قال

ضمني النبي ﷺ إلى صدره وقال اللهم علمه الحكمة حدثنا أبو معمر حدثنا عبد الوارث وقال علمه الكتاب حدثنا موسى حدثنا وهيب عن خالد مثله والحكمة الإصابة في غير النبوة

البخاري 3756صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Virtues of the companions of the Prophet ﷺ
Chapter
Ibn Abbas, may Allah be pleased with them both
Numbering
Darussalam 3756
Bukhari 3756