I'm using the latest version of HTTP request app (v19) and want to do the following:
Request type: POST a body
Body content: Custom > Multi-line text with variables
Where I would like to populate with the following JSON:
Code: Select all
'{
"model": "gpt-4-1106-preview",
"messages": [
{
"role": "user",
"content": "Write a poem about flowers"
}
],
"temperature": 1,
"max_tokens": 256,
"top_p": 1,
"frequency_penalty": 0,
"presence_penalty": 0
}'
The only work-a-round I could figure out is to:
1. Create the JSON as a textfile (Create text file-app) but replace the square brackets with %startbracket% %endbracket%
2. Use String replace-app to convert %startbracket% %endbracket% to square brackets again
3. Post the textfile with HTTP request: POST > Attached file > [Job.Path]
But I guess that there is a better way, any suggestions?