# Lingering text in text completion API response

**URL:** <https://community.openai.com/t/lingering-text-in-text-completion-api-response/198220>\
**Category:** Prompting\
**Tags:** chatgpt, api\
**Created:** [May 8, 2023, 6:29pm UTC](https://community.openai.com/t/lingering-text-in-text-completion-api-response/198220 "2023-05-08T18:29:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![okuyucu](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/okuyucu/32/125990_2.png) [@okuyucu](https://community.openai.com/u/okuyucu)\
**Post date:** [May 8, 2023, 6:29pm UTC](https://community.openai.com/t/lingering-text-in-text-completion-api-response/198220/1 "2023-05-08T18:29:42Z")

</div>

I made a small project on SMS using twilio serverless backend, and making api calls to chatGPT. Every once in a while the response starts with a few random words (still related to the overall theme) before the actual response. The responses I expect typically start with a greeting like “Dear xyz,…” and most of the time it works but every once in a while, I see a few words at the beginning. Not sure how to debug.

---

<div class="post-metadata">

**Author:** ![PaulBellow](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/paulbellow/32/597962_2.png) [@PaulBellow](https://community.openai.com/u/PaulBellow)\
**Post date:** [May 8, 2023, 6:30pm UTC](https://community.openai.com/t/lingering-text-in-text-completion-api-response/198220/2 "2023-05-08T18:30:34Z")

</div>

Welcome to our dev community.

What’s your prompt look like? Any extra spaces or newlines at the end of it occasionally?

---

<div class="post-metadata">

**Author:** ![okuyucu](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/okuyucu/32/125990_2.png) [@okuyucu](https://community.openai.com/u/okuyucu)\
**Post date:** [May 10, 2023, 1:49pm UTC](https://community.openai.com/t/lingering-text-in-text-completion-api-response/198220/3 "2023-05-10T13:49:09Z")

</div>

I’m asking a few questions to the user to create a “thank you” note, and my prompt is:  
Please create a thank you note for someone in my life. Keep it short and informal. Use the following questions and my answers to make it personal: 1. Can you think of someone who has made a positive impact on your life, whether it’s through their support, kindness, or just presence? It could be a friend, family member, teacher, or even a colleague.: [user response] 2. What do you call them?: [user response] 3. Can you share a specific moment…” I’ve like 5 questions and user’s responses. User’s responses are escaped for special characters.
