ChatGPT - Quotation Marks

This is driving me bonkers… Trying to get ChatGPT to create a title for a blog post and almost every time it comes up in quotation marks (") - just want the title not in quotes!

I have added “Don’t enclose output in single (') or double quotes(”), provide it as it is." but sure enough… keeps adding them. Any suggestions on how to make sure they aren’t there at all??

Where do you add your “Don’t enclose output in single (') or double quotes(”), provide it as it is.”?

From my experience, it will most likely be ignored if it’s not the very last thing in the prompt. Maybe try that?

1 Like

Is there any other way to manipulate data in Activepieces? In the new piece Robolly, I get the URL in quotes and cannot use it in the next module. I would use the text parser or tools module in Make.

Even though I could use OpenAI module and tell it to remote quote, there must be a better way?

You can add a code that replaces the double quotes only at the start and end.

Here’s the code. It accepts the text parameter and uses regex to remove double quotes from the text.

export const code = async (inputs) => {
    return inputs.text.replace(/^"|"$/g, "");

@Shawn_Ryder, I don’t think many solutions work flawlessly; aside from the regex solution listed above, I find using this seems to work 99% of the time for me:

Format the output as a plain text string without any surrounding quotes.

Always get that odd occurrence every now and then where it plays up and adds them. But for the most part, it does the job.

Kind regards,

@ashrafsam, as a side note, perhaps we could also add this to the text helper piece (along with the slugify I suggested in another post)?

You guys are amazing thanks very much - going to give them a try now!

1 Like

See a new text feature to remove them using search - all very good now, fixed with no issues!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.