https://api.openai.com/v1/engines/davinci-msft/completions
{
"prompt": @{triggerBody()['Initializevariable_Value']},
"temperature": 0.5,
"max_tokens": 100,
"top_p": 1,
"frequency_penalty": 0.2,
"presence_penalty": 0,
"stop": [
"\"\"\""
]
}
{
"id": "cmpl-xxxxxxxxxxx",
"object": "text_completion",
"created": 1640707195,
"model": "davinci:2020-05-03",
"choices": [
{
"text": " really bright. You can see it in the sky at night.\nJupiter is the third brightest thing in the sky, after the Moon and Venus.\n",
"index": 0,
"logprobs": null,
"finish_reason": "stop"
}
]
}
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"object": {
"type": "string"
},
"created": {
"type": "integer"
},
"model": {
"type": "string"
},
"choices": {
"type": "array",
"items": {
"type": "object",
"properties": {
"text": {
"type": "string"
},
"index": {
"type": "integer"
},
"logprobs": {},
"finish_reason": {
"type": "string"
}
},
"required": [
"text",
"index",
"logprobs",
"finish_reason"
]
}
}
}
}
select the Type as String
After parsing we need to loop the array and assign the text to the variable
Bring Apply to each action
Select Choices as the array property
now bring Set variable action
Assign the currentitem to the variable outsummary
Note: this process can be applied to any HTTP REST enabled actions needed to be invoked by Power Apps
My second grader asked me what this passage means:\n\"\"\"\nJupiter is the fifth planet from the Sun and the largest in the Solar System. It is a gas giant with a mass one-thousandth that of the Sun, but two-and-a-half times that of all the other planets in the Solar System combined. Jupiter is one of the brightest objects visible to the naked eye in the night sky, and has been known to ancient civilizations since before recorded history. It is named after the Roman god Jupiter.[19] When viewed from Earth, Jupiter can be bright enough for its reflected light to cast visible shadows,[20] and is on average the third-brightest natural object in the night sky after the Moon and Venus.\n\"\"\"\nI rephrased it for him, in plain language a second grader can understand:\n\"\"\"\nJupiter is the fifth planet from the Sun. It is a big ball of gas. It is really bright, and you can see it in the sky at night. The ancient people named it after the Roman god Jupiter.\nJupiter is really big. It is bigger than all of the other planets in the Solar System combined. Jupiter is so big that if you could fit all of the other planets inside of Jupiter, you could still see Jupiter shining in the night sky!\nJupiter is
Set(summarytext,getsummary.Run(TextInput1.Text))
summarytext.summarytext
Samples2022/openaigpt3.md at main · balakreshnan/Samples2022 (github.com)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.