Did someone (like literally just this minute) change how generation works, so there is no .onFinishPromise any more? I’ve fixed my code but that was sudden 😂

Maybe for backwards compatibility there could be a property called that pointing to the same promise?

Ah I see, the returned object is the promise now, and can be used whether the input was a string or an object.

  • perchance@lemmy.worldM
    link
    fedilink
    English
    arrow-up
    2
    ·
    30 days ago

    @Alllo@lemmy.world Very very sorry - a tangentially related bug that I accidentally introduced during this plugin upgrade broke your /beautiful-people gen for the past few hours 😓 in case you get feedback and are confused that it’s working for you, you know why now

    • perchance@lemmy.worldM
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      30 days ago

      Sorry!! Yes, I just noticed this a couple of minutes ago and fixed it. It was due to a change ~10 minutes ago that now allows for writing let result = await textToImage(promptOptions); - i.e. it now returns the onFinishPromise, while staying backwards-compatible by overwriting the toString of the promise to return the normal iframe HTML. The problem was that I forgot to add onFinishPromise as a property on the returned Promise (i.e. referencing itself) to maintain backwards-compat.

      Also, side note: I did this for the ai-image-plugin several weeks ago, so you can write also let result = await aiText(promptOptions) instead of let result = await aiText(promptOptions).onFinishPromise with that plugin too.

      Maybe for backwards compatibility there could be a property called that pointing to the same promise?

      If there’s ever a backwards-incompatibility, it’s ALWAYS a bug. I cannot stress this enough. I take backwards compatibility really seriously. If I’m ever the cause of your code breaking, that’s my fault, not yours, and it should be reported as a bug.

      Thanks for the report!