Hola

in the default plugins there are three problems i came across. Since i’m not aware of a git instance where i could create a pull request it gotta be this way.

  1. Memory leak in text-to-speech-plugin

If a textStream is present it is split into sentences and then for each sentence the plugin itself is called (so it’ll be handled as string input). But that does not work if the string gets interpreted as “more than four sentences” (L28) in the recursive call making it an infinite loop. An example sentence in my case was “*\nSome text…”. In that example in L28 the newline and the … are counted as individual sentences. The simple fix that worked without problems so far is to change the regex in L28 to /\p{Sentence_Terminal}+/u (notice the +). If multiple of the sentence terminators are detected right behind each other, it’ll group them as one.

  1. ‘hideStartWith’ parameter in ai-text-plugin

The hideStartWith should hide the startWith value from the result. But it does not work for streaming, so chucks and textStream still contain the startWith value. Easy fix is to add && !hideStartWith to the if condition in L490. I would really need this at least for the textStream (which is handled in the ‘if’) but should be fine for chunks as well.

  1. Heads up notice of ai-text-plugin “forks”

When the ai-text-plugin is “forked” it shows the big red message but the link points to the image plugin. The href attribute was not adjusted, right there in L1 of ai-text-plugin.

Thanks

  • TAPgiles@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    18 hours ago

    I’ve used the AI text plugin a fair bit, but have never seen something called textStream. And it’s not listed on the plugin page. Where can I actually find it?