Hello mitttttsu ,
Thanks for reaching out in the Microsoft Q&A!
To fix the issue, update your PowerApps OnSelect
function with the following code:
Set(
YourImageName.Image,
DALLE.DALLE(
{
'api-version': "2024-02-15-preview",
'Content-type': "application/json",
prompt: TextInput1.Text,
n: 1,
size: "1024x1024"
}
).results[0].url
)
This code sets the generated image URL as the Image
property of an Image control named YourImageName
. Kindly Replace YourImageName
with the actual name of your Image control.
If you found this solution helpful, consider accepting it.