How to add a page break to a JSON response – APIs


Hi Team,
I am calling an API to get my PDF converted into JSON format text. And this converted JSON text’s need to be applied for calling ChatGPT. The problem is ChatGPT expects these inputs with a pagebreak (\n) after each statement. So far I haven’t managed to get a solution to this, as how to add a page break. And I would really appreciate if someone can help.

Example –
My input content for ChatGPT is “I want the summary about the following profile to understand their skillsets. Break and group it based on each skillset”. So this must be passed as below, where I need \n to be added after each statement.
{
“model”: “gpt-3.5-turbo”,
“messages”: [
{
“role”: “system”,
“content”: “Act as an HR personnel to shortlist the candidate based on skillset”
},
{
“role”: “user”,
“content”: “I want the summary about the following profile to understand their skillset. \n Break and group it based on each skillset”
}
]
}

Why does GPT need line spacing?



Source link

Leave a Comment