How to maintain a conversation with ChatGPT while providing long instructions and writing articles?

This topic was automatically generated from Slack. You can find the original thread here.

I am using Chat GPT to write articles.

Before I can write the article, I need to give it directions before I give it the article.

The directions are very long.

I believe I need to have a workflow which will give ChatGPT the instructions first and then give ChatGPT the article.

How do I keep the conversation going using the CHATGPT App?

To achieve this with Pipedream, you can create a workflow with the OpenAI ChatGPT app. First, you’ll need to set up a trigger for your workflow (e.g., an HTTP trigger, a scheduler, or an app-based event). Then, you can add the ChatGPT action to send the instructions and the article text. Here’s a step-by-step guide: 1. Create a new workflow in Pipedream and add a trigger (e.g., HTTP trigger, Scheduler, etc.). 2. Search for the OpenAI ChatGPT app in the Pipedream UI and add the “Send a message to ChatGPT” action to your workflow. 3. Configure the action by providing your OpenAI API key and setting the messages parameter. You’ll need to format the messages as an array of objects, with each object containing a role (either “system”, “user”, or “assistant”) and content (the message text). For example, you can set up the messages like this: ```
on [ { “role”: “system”, “content”: “Your long instructions go here.” }, { “role”: “user”, “content”: “Your article text goes here.” } ]

What do I put in the Prior Message History?

In the “Prior Message History” field, you should provide an array of message objects that represent the conversation history with ChatGPT. Each object should have a role (either “system”, “user”, or “assistant”) and content (the message text). For example: ```
on [ { “role”: “system”, “content”: “Your long instructions go here.” }, { “role”: “user”, “content”: “Your article text goes here.” } ]

Can anyone help me use the actual CHATGPT application?

Hi Steven, can you please take a look at System Instructions on this article?

thanks for the documentation.

I read the documentation that you gave me and even looked elsewhere but I was unable to get the chat to keep the conversation going.

Here is a screenshot of the first chat that I call on:

Here is the second chat that I call on in my workflow.

So when I run the first one, it runs just fine.

Here are some things that I have observed.

  1. **For the first CHATGPT app, I set the SYSTEM INSTRUCTIONS to: “**You are a features editor for SOHH.com
  2. **For the second CHATGPT app, I set the SYSTEM INSTUCTIONS to: “**You are a features editor for SOHH.com
    However, the error says the following:
Configuration error
The following message doesn't have a "role" property:

[
{
"role": "system",
"content": "You are a features editor for [SOHH.com](http://SOHH.com)"
},
{
"role": "user",
"content": "\n\nPLEASE REPLY BACK WITH YES WHEN YOU ARE READY TO BEGIN."
},
{
"role": "assistant",
"content": "Yes, I'm ready to begin. Please let me know how I can assist you as a features editor for SOHH.com."
}
]

See the docs here: https://platform.openai.com/docs/guides/chat/introduction

When I run the CHATGPT APP, I am getting an error that the role propery is not set. Here is the error:

Configuration error
The following message doesn't have a "role" property:

[
{
"role": "system",
"content": "You are a features editor for [SOHH.com](http://SOHH.com)"
},
{
"role": "user",
"content": "\n\nPLEASE REPLY BACK WITH YES WHEN YOU ARE READY TO BEGIN."
},
{
"role": "assistant",
"content": "Yes, I'm ready to begin. Please let me know how I can assist you as a features editor for SOHH.com."
}
]

I apologize for the confusion. It seems like the error is related to the formatting of the messages you provided. The issue might be caused by the use of angle brackets < and > in the URL. Please try replacing them with standard parentheses ( and ) like this: ```
on [ { “role”: “system”, “content”: “You are a features editor for (http://SOHH.com|SOHH.com)” }, { “role”: “user”, “content”: “PLEASE REPLY BACK WITH YES WHEN YOU ARE READY TO BEGIN.” }, { “role”: “assistant”, “content”: “Yes, I’m ready to begin. Please let me know how I can assist you as a features editor for SOHH.com.” } ]

my original message did not have brackets or symbols.

I apologize for the confusion earlier. In that case, let’s try to resolve the issue with the ChatGPT app in your workflow. Please make sure that the “Prior Message History” field in the second ChatGPT app contains the correct conversation history, formatted as an array of message objects with role and content properties. For example: ```
on [ { “role”: “system”, “content”: “You are a features editor for SOHH.com” }, { “role”: “user”, “content”: “PLEASE REPLY BACK WITH YES WHEN YOU ARE READY TO BEGIN.” }, { “role”: “assistant”, “content”: “Yes, I’m ready to begin. Please let me know how I can assist you as a features editor for SOHH.com.” } ]

I created a basic two step chat workflow.

Step 1, the chat conversation declares that CHATGPT 's name is BOB.

Step 2, it asks CHATGPT what is it’s name.

I set the Prior Message History in Step 2.

Here are the errors I have received.

Configuration error
The following message doesn't have a "role" property:
[
{
"role": "system",
"content": "You are a helpful assistant"
},
{
"role": "user",
"content": "Your name will be BOB for this session."
},
{
"role": "assistant",
"content": "Okay! Hi, I'm BOB and I'm here to assist you. What can I help you with today?"
}
]
openai
$auth{1}
api_key:
*********
modelId
gpt-3.5-turbo
userMessage
What is your name?
systemInstructions
You are a helpful assistant
messages
[ [ { "role": "system", "content": "You are a helpful assistant" }, { "role": "user", "content": "Your name will be BOB for this session." }, { "role": "assistant", "content": "Okay! Hi, I'm BOB and I'm here to assist you. What can I help you with today?" } ] ]

I apologize for the confusion earlier. Based on the error message you provided, it seems that the conversation history is formatted correctly. However, there might be an issue with the way the ChatGPT app is processing the input. To help you further, I would need more information about your workflow setup, specifically the configuration of the ChatGPT app in both steps. If you could provide screenshots or more details about the settings in each ChatGPT app, I’ll be able to assist you better.

Here are the screenshots you requested.

Thank you for providing the screenshots. However, I’m unable to view the screenshots in this format. To better assist you, please provide more details about the configuration of the ChatGPT app in both steps, such as the user message, system instructions, and prior message history. This will help me understand your workflow setup and identify any issues that might be causing the error.

what format would you like the screenshots in?

I apologize for the confusion earlier. As a text-based AI, I’m unable to view or process screenshots directly. Instead, please provide a detailed description of the configuration settings in each ChatGPT app, such as the user message, system instructions, and prior message history. This will help me understand your workflow setup and identify any issues that might be causing the error.

what is the DISCORD URL for Pipedream Help?