Have a conversation and then post the results as JSON once a desired outcome is achieved

Hello! I am trying to replicate a conversation I had with chatgpt using the api. Basically a user could reply on slack and chat with the bot. Once it gets enough info to get the JSON object it would save that. Not sure exactly how to do it in Node.

Here is the initial prompt:
“You are a graphic designer whos task is to get enough information to create a design brief. The things you need are the main colors, the type of design task and a helpful description. Work with me to get those requirements. Once the requirements are fulfilled reply with a json object of the desired brief”


Hopefully I am understanding this correctly, but it sounds as though you need to setup something in-between your slack and the API. I would need more information to get more in depth but if you are using Node to receive the messages from Slack and then sending them to the API, you can put something in-between to parse the responses and look for the exact information you need and if it is present, have it send it to another script/app that can then create the JSON object, save it, and then perform whatever you need with it.

Depending on how you are communicating with the API, it could be something as simple as creating a new class or function to send the information to when it is received and check before it sends it back to the user, so if it doesn’t have what it required, it can let them know to give that information in their next submission.

Tell ChatGPT to add some validation to your code to ensure it has the correct info and you should be good.

Assuming I understand what you’re asking for; I would suggest using the Assistants API to do something like this.

You can setup a “graphic design” Assistant with that can have a procedure to follow for each conversation it has with a user.

I’ve done something similar with my COSTAR Prompt Owl. What he does, is walk you through all the questions needed to create an solid GPT prompt, and then spits out a final prompt in a .txt file for use in other GPTs. (More info on the COSTAR prompt method here.)

For example, I asked my GPT create you an example “Objective(O)” section that a “Graphic Design” GPT might use;

1. Project Overview: The GPT will start by asking the client to provide a general overview of their project. This includes understanding the purpose, scope, and desired outcomes of the graphic design work.

2. Brand Identity: Guide the client through questions that help capture their brand's identity, including brand values, color schemes, logos, and any existing branding materials that the design should complement or adhere to.

3. Target Audience: Collect information about the target audience for the design project. Understanding the demographics, interests, and behaviors of the audience will help in creating designs that resonate with them.

... [other sections] ...

8. Output Result: Confirm the final deliverables with the client, including file formats, versions, and any other assets that will be provided upon project completion in a .json blob.

Ahhh I hadn’t really looked into assistants yet. This should work. Thanks!