I want to use OpenAI module’s extract structured data feature.
However, setting up Structured Data Definition manually with GUI is pretty tiring.
Can I instead copy paste a certain format of JSON and let it set the Structured Data Definition?
I want to use OpenAI module’s extract structured data feature.
However, setting up Structured Data Definition manually with GUI is pretty tiring.
Can I instead copy paste a certain format of JSON and let it set the Structured Data Definition?
Welcome to the Make community!
That’s what the map toggle does.
The Array Aggregator module allows you to build a complex array of collections for a later module’s field to map multiple items (collections) to it.
Here is an example of using the “Target structure type” of an Array Aggregator module:
As you can see, the “Map” toggle on fields are used when you have an array. You can easily build an array variable to map to a field, by using an Array Aggregator module and select the “Target Structure Type” as the future field you want to map the array into.
Alternatively, you can use a Parse JSON module instead of an Array Aggregator.
Either way, you’ll need an array of complex collections.
samliew – request private consultation
Join the unofficial Make Discord server to chat with other makers!
Hi @ samliew Thank you for your response.
What if when I want to do a below scenario? I read through the docs but not sure if this is the right approach using aggregator.
Hi Sam! Thank you for your answer here.
But I have difficulties understanding how Array Aggregator and Parse JSON should be used in my scenario.
I simply want to provide the JSON definition to be used inside Structured Data.
I can successfully run this scenario manually and a successful input bundle looks like this
[
{
"model": "gpt-3.5-turbo",
"prompt": "Organize the job description data into structured format",
"rawText": "[some job posting]",
"parameters": [
{
"name": "PositionKind",
"type": "string",
"isRequired": true,
"description": "募集職種"
},
{
"name": "WorkLocation",
"type": "string",
"isRequired": true,
"description": "勤務地"
},
{
"name": "CompanyName",
"type": "string",
"isRequired": true,
"description": "会社名"
}
]
}
]
So that JSON inside "parameters"
is what I want to generate and map
it with ChatGPT module.
I tried playing with Array Aggregator, but where do I actually define what goes inside?
I also looked at Parse JSON but that requires initial values to be filled manually after defining data structure… but that is not applicable to my use case.
Could you please advise me on how I should approach this?
Hey @leochoo
If you want to generate same structure of json using ChatGPT, you can do it in “Create a completion module” itself also. So it will save one operation for another module.
To do this, you will need to create this json structure in “Create JSON” module and run that module without mapping anything. This will give you the JSON.
Now this JSON you need to map in GPT module and prompt to always follow that structure. and also you need to select Response format as JSON object.
Regards,
Msquare Automation - Gold Partner of Make
Visit us here | Youtube Channel