Valmiki Ramayana Kishkindha Kanda Sarga 22 Shloka 23
Original Shlokaन चातिप्रणयः कार्यः कर्तव्योऽप्रणयश्च ते। उभयं हि महान्दोष स्तस्मादन्तरदृग्भव4.22.23।।
1 source checked for this shloka
अतिप्रणयः excessively friendly, ते by you, न कार्यः should not be, अप्रणयश्च lack of love also, न कर्तव्यः not to be, उभयम् both, महान्दोषम् will amount to serious mistake, तस्मात् therefore, अन्तरदृक् insightful, भव be.
'You are not to be excessively friendly or otherise as both are serious mistakes. Therefore, be insightful.'