Hello, friends. I was experimenting with the OpenAI playground. I got a big problem here. I don’t know how to stop a model from writing extra text after it’s done what I want it to do.
Here, I’ve already got my desired completion : If you exercise on a regular basis, you will have good health.
However, the model is still generating additional tokens (This sentence…as long as it is changed). Please take a look at the attached screenshot
I’d use stop and specify ‘\n’ as a stop sequence. You can experiment with different stop sequences to see what works best.
Edit: On taking a careful look at your prompt, I noticed that you’re using ‘\n’ in playground. I’m curious why would you do that? Given that simply writing in the next line automatically appends a ‘\n’ in the string. ‘\n’ is an escape sequence which means new-line.