Snippet and chatgpt

so I have this OpenAI snippet right now

{formtoggle: name=Narrative AI?\ ; default=no}{openai-text: correct punctuation, correct spacing, proof read, don't disturb words in all caps: {clipboard}; format=formparagraph}{endformtoggle}

I want to run the above snippet after completing another snippet to correct all spacing and punctuation. How can I incorporate so that when I click insert the openai snip will also be ran? is it possible to do so and how so I don't have to copy the initial snippet result and then run this OpenAI snip?

Hi @Felix , that's an interesting idea! There's no direct way to run two snippets one after the another. So, what you have is the current best solution :slightly_smiling_face:

Hopefully this can be a thing in the future. There are different ways of implementation than running two snippets. Perhaps a preview box of output of what you have entered into the first snippet, then below have a formtoggle Narrative AI? That would only use the text from the output preview for the prompt, and when inserted only insert what is generated from the ChatGPT formparagraph?

Yes you can do that. Have a look at this:

{note}{formparagraph: name=Your input; default=My input goes here}{endnote}
{formtoggle: name=run ai🚀}{openai-text: correct punctuation, correct spacing, proof read, don't disturb words in all caps:

"""
{=`Your input`}
"""'; format=formparagraph}{endformtoggle}

Let me know if it works for you.

1 Like

is there a way to preview the result of my 1st snippet and then use that result to run ai by appending what you provided here?

Yes you can do that. I modified my snippet above to support that. Have a look at this:

{note}{formparagraph: name=Your input; default=Input goes here}
{prompt="correct punctuation, correct spacing, proof read, don't disturb words in all caps:

\"\"\"
" & `Your input` & "
\"\"\"'"}
My prompt is: {=prompt}{endnote}

Press this button to run AI:
{formtoggle: name=run ai🚀}{openai-text: {=prompt}; format=formparagraph}{endformtoggle}

Let me know if it works for you.