This is from the book of Wisdom. This is the prayer Solomon may have used when requesting wisdom from God.
God of my fathers, and Lord of mercy, who hast made all things with thy word, And by thy wisdom hast appointed man, that he should have dominion over the creature that was made by thee, That he should order the world according to equity and justice, and execute justice with an upright heart: Give me wisdom, that sitteth by thy throne, and cast me not off from among thy children: For I am thy servant, and the son of thy handmaid, a weak man, and of short time, and falling short of the understanding of judgment and laws. For if one be perfect among the children of men, yet if thy wisdom be not with him, he shall be nothing regarded.
Thou hast chosen me to be king of thy people, and a judge of thy sons and daughters: And hast commanded me to build a temple on thy holy mount, and an altar in the city of thy dwelling place, a resemblance of thy holy tabernacle, which thou hast prepared from the beginning: And thy wisdom with thee, which knoweth thy works, which then also was present when thou madest the world, and knew what was agreeable to thy eyes, and what was right in thy commandments. Send her out of thy holy heaven, and from the throne of thy majesty, that she may be with me, and may labour with me, that I may know what is acceptable with thee: For she knoweth and understandeth all things, and shall lead me soberly in my works, and shall preserve me by her power. So shall my works be acceptable, and I shall govern thy people justly, and shall be worthy of the throne of my father.
For who among men is he that can know the counsel of God? or who can think what the will of God is? For the thoughts of mortal men are fearful, and our counsels uncertain. For the corruptible body is a load upon the soul, and the earthly habitation presseth down the mind that museth upon many things. And hardly do we guess aright at things that are upon earth: and with labour do we find the things that are before us. But the things that are in heaven, who shall search out? And who shall know thy thought, except thou give wisdom, and send thy holy Spirit from above: And so the ways of them that are upon earth may be corrected, and men may learn the things that please thee? For by wisdom they were healed, whosoever have pleased thee, O Lord, from the beginning.