Map GPT Outputs to Inputs

I’ve 3 modules, WordPress (Watch Post) → Chat-GPT (Edit) → Wordpress (Create Post).

3 inputs (Title, Excerpt, Content) are passed to GPT for edit (Translation) then new post will be created in another language. In the 3rd module, Create Post, there isn’t options of Title, Excerpt, Content to map New Post inputs with.

Welcome to the Make community!

1. Screenshots of module fields and filters

Please share screenshots of relevant module fields and filters in question? It would really help other community members to see what you’re looking at.

You can upload images here using the Upload icon in the text editor:
Screenshot_2023-10-07_111039

2. Scenario blueprint

Please export the scenario blueprint file to allow others to view the mappings and settings. At the bottom of the scenario editor, you can click on the three dots to find the Export Blueprint menu item.

Screenshot_2023-08-24_230826
(Note: Exporting your scenario will not include private information or keys to your connections)

Uploading it here will look like this:

blueprint.json (12.3 KB)

3. And most importantly, Output bundles

Please provide the output bundles of the modules by running the scenario, then click the white speech bubble on the top-right of each module, save the bundle contents in your text editor as a bundle.txt file, and upload it here into this discussion thread.
Screenshot_2023-10-06_141025

Providing the output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.

Following these steps will allow others to assist you here. Thanks!

2 Likes

Hey @ptssw

To resolve this, you might need to:

Check the capabilities of the WordPress plugin or integration tool you are using for the"Create Post" module.

After that you see the all option like this :

2 Likes

Wordpress input fields work fine but with initial Wordpress inputs are feeded into Chat-GPT, they’re combined into array. From Chat-GPT to new Wordpress post, there’s no input options from Chat-GPT to multiple fields of Wordpress post creation.

The output is stored in the Choices property. While the content is a single variable, you’ll need to process the text based on how you want the title to be formatted. E.g.: If the output of GPT returns your title on the first line, you need to “split” the text into title and content.

2 Likes

@ptssw
According to your need i think you need 3 chatgpt module

  1. For title
  2. For content
  3. For Excerpt

And you will get your generated text here.

1 Like

Why do we need separate GPT calls? Can’t a single request to GPT generate a post title and content at the same time?

For the excerpt, isn’t it just a shortened form of the content, which you can take the first X words of the content?

2 Likes

@samliew
While generating titles from Chat-GPT for content is possible, it is not considered best practice. If you choose to generate titles along with content using Chat-GPT, you can do so.

And I am just suggesting that it could be beneficial for @ptssw

2 Likes

In a single call, all 3 components of 1. For title
2. For content
3. For Excerpt

are combined and translated probably as array by Chat GPT. I’m struggling to break the array into 3 different component again so they can be mapped into their relevant input fields to create new post.

Hey @ptssw
Acoording to your need you can add this prompt in your chat gpt module
Screenshot 2024-01-03 125902

after that you can use this module “parse json”

and you will get output like this
Screenshot 2024-01-03 130122

2 Likes

I tried following but struggling to get the last image. I’m getting this “19:33
The operation failed with an error. [400] Invalid parameter: ‘response_format’ of type ‘json_object’ is not supported with this model.”.

blueprint (1).json (24.5 KB)

Hey @ptssw
you are using text in json input
Screenshot 2024-01-03 181040

you should use this in your input

2 Likes

Can’t get to your last image still, only ChatGPT and Wordpress inputs, no JSON

@ptssw

Click on ‘Choices,’ then go to ‘Messages,’ where you will find the content.
Screenshot 2024-01-03 183415

2 Likes

That was done, but in Wordpress create post module, no JSON to select from.