Le Deutéronome 21:14 Midrash : Bereishit Rabbah

וְהָיָ֞ה אִם־לֹ֧א חָפַ֣צְתָּ בָּ֗הּ וְשִׁלַּחְתָּהּ֙ לְנַפְשָׁ֔הּ וּמָכֹ֥ר לֹא־תִמְכְּרֶ֖נָּה בַּכָּ֑סֶף לֹא־תִתְעַמֵּ֣ר בָּ֔הּ תַּ֖חַת אֲשֶׁ֥ר עִנִּיתָֽהּ׃ (ס)

S’il arrive que tu n’aies plus de goût pour elle, tu la laisseras partir libre de sa personne, mais tu ne pourras pas la vendre à prix d’argent: tu ne la traiteras plus comme esclave, après lui avoir fait violence.

Bereishit Rabbah

...'And Avram said to Sarai: do it her what is good in your eyes!' (Gen. 19:6) He said to her: "what do I care about her well being or her harm? [But] It is written: 'You will not deal with her as a slave since you humbled her' (Deuteronomy 21:14), and this one, after we made her suffer, we will enslave her? I don't care about her well being or her harm. [But] It is written 'he shall not have the right to sell her to foreigners, since he broke faith with her' (Exodus 21:8) and this one, after we made her a master we will make her a slave? I don't care about her well being or her harm." 'Then Sarai treated her harshly, and she ran away from her.' Rabbi Aba bar Kahana said: she forbade her from having sexual relations. Rabbi Berachia said: she slapped her face with a slipper. Rabbi Berachia in the name of Rabbi Aba Bar Kahana said: She made her carry water buckets and bath towels to the baths."A