Thanks! I think this is solved now - sorry about that. Please let me know if you still see issues.
Perchance - Create a Random Text Generator
⚄︎ Perchance
This is a Lemmy Community for perchance.org, a platform for sharing and creating random text generators.
Feel free to ask for help, share your generators, and start friendly discussions at your leisure :)
This community is mainly for discussions between those who are building generators. For discussions about using generators, especially the popular AI ones, the community-led Casual Perchance forum is likely a more appropriate venue.
See this post for the Complete Guide to Posting Here on the Community!
Rules
1. Please follow the Lemmy.World instance rules.
- The full rules are posted here: (https://legal.lemmy.world/)
- User Rules: (https://legal.lemmy.world/fair-use/)
2. Be kind and friendly.
- Please be kind to others on this community (and also in general), and remember that for many people Perchance is their first experience with coding. We have members for whom English is not their first language, so please be take that into account too :)
3. Be thankful to those who try to help you.
- If you ask a question and someone has made a effort to help you out, please remember to be thankful! Even if they don't manage to help you solve your problem - remember that they're spending time out of their day to try to help a stranger :)
4. Only post about stuff related to perchance.
- Please only post about perchance related stuff like generators on it, bugs, and the site.
5. Refrain from requesting Prompts for the AI Tools.
- We would like to ask to refrain from posting here needing help specifically with prompting/achieving certain results with the AI plugins (
text-to-image-pluginandai-text-plugin) e.g. "What is the good prompt for X?", "How to achieve X with Y generator?" - See Perchance AI FAQ for FAQ about the AI tools.
- You can ask for help with prompting at the 'sister' community Casual Perchance, which is for more casual discussions.
- We will still be helping/answering questions about the plugins as long as it is related to building generators with them.
6. Search through the Community Before Posting.
- Please Search through the Community Posts here (and on Reddit) before posting to see if what you will post has similar post/already been posted.
Sadly now the outputs go haywire. Chinese, russian, hebrew words seeping in, words/sentences get continued with nonsense. Only 3 of 7 rerolls were bug free when I tried. Edit: or this:
ofộiAnon's fingersKENN smoothing the petals with HB4 unmistakable tenderness.
Yeah I've seen random Chinese characters appear too.
Thank you developer!
Same issue here

i noticed that this morning, it's add that glyph or a zero length character. breaks a lot of things. i had to update the JSON parser i use to try and accommodate those additions. works, some of the time.
parseJSON: (input) => { if (!input) return null;
// 1. OBJECT HANDLING (Already parsed)
if (typeof input === 'object') {
if (typeof input.text === 'string') return Utils.parseJSON(input.text);
if (typeof input.generatedText === 'string') return Utils.parseJSON(input.generatedText);
return input;
}
// 2. STRING HANDLING (The Toughened Shield)
if (typeof input === 'string') {
let clean = input.trim();
// A. Strip Markdown Code Blocks
clean = clean.replace(/```json/gi, "").replace(/```/g, "");
// B. REINFORCED EXTRACTION
// We find the FIRST occurrence of an opening bracket/brace
// and the LAST occurrence of the matching closing bracket/brace.
const firstObj = clean.indexOf('{');
const firstArr = clean.indexOf('[');
let firstOpen = -1;
let lastClose = -1;
if (firstObj !== -1 && (firstArr === -1 || firstObj < firstArr)) {
firstOpen = firstObj;
lastClose = clean.lastIndexOf('}');
} else if (firstArr !== -1) {
firstOpen = firstArr;
lastClose = clean.lastIndexOf(']');
}
if (firstOpen !== -1 && lastClose !== -1 && lastClose > firstOpen) {
// C. HARD TRUNCATION
// We extract ONLY what is between the brackets.
// This kills the trailing "〖" and any other AI rambling.
clean = clean.substring(firstOpen, lastClose + 1);
// D. Post-Extraction Cleanup
clean = clean.replace(/,(\s*[}\]])/g, '$1'); // Remove trailing commas
try {
return JSON.parse(clean);
} catch (e) {
// LAST DITCH: If it still fails, it's usually unescaped newlines in a string
try {
// Replace literal newlines inside JSON strings with escaped \n
const escaped = clean.replace(/\n/g, "\\n").replace(/\r/g, "\\r");
return JSON.parse(escaped);
} catch (e2) {
console.warn("[Utils] JSON Parse Failed despite extraction:", e.message);
}
}
}
}
console.warn("[Utils] JSON Parse Total Failure. Input sample:", input.substring(0, 100));
return null;
}
Sorry about that! Should be solved now.
btw weirdly this isn't happening in those "official" gens

My guess is that this would have just been related to stopSequences or parsing (you can see the actual/full generated text in the browser console). Another possibility is that the requests you made there happened to be routed to a server that didn't have the bug (since the buggy changes I made were rolling out iteratively).
I didn't want to start a new thread to point out the current errors. (NOTE: The texts are in German because I'm not good at English. I only translated the categories and notes with a translator. (IF ANYTHING IS UNCLEAR, PLEASE LET ME KNOW)). The names have been changed intentionally and most of the text has been shortened, but the errors should still be recognizable.
Other languages, strange symbols, and numbers:
- und stellt sie zusammen mit den Keksen auf ein330 Silbertablett.
- ist nichts weiter als einfacheਿਭBauern
- Du wirst dich dafür bei mir的数 (Translated: die Anzahl)
- Ich hab... ich hab Angst, dass sie mich holen kommt. Ihre Hände verkrampfen sich leicht in seinem Hemd所以才要逃跑 逃出这个可怕的地方 (Translated: "Deshalb muss ich fliehen – diesem schrecklichen Ort entkommen." Sounds more like a thought than dialogue or action.)
- Ihr Blick flackert zwischen Cloes Gesicht und dem Ort, wo Anon verschwunden ist sapphire hin und her.
Spelling/grammar errors:
- "schnaift"
- "Vielle-light..."
- "...dem Gosse!"
- "...mein Dank?"
- "Du wirst dich noch wünschen..."
- "Sie drückt sich gyumütlicher an..."
- Cloe erstarrt für einen Moment, als würde sie ihren Ahmed nicht trauen.
Memory/Lore Search Queries Used error:
- Past conflicts between Cloe and Anon regarding parenting Max/USMustermann
(Side note: 90% of this is in English. Occasionally, it is in German.)
In memory itself:
- aber sie besteht darauf, dass Anon nichts über sie weiß, und weigert sich, Cloe振り解く zu lassen.
Suddenly, a different topic:
- während er sich etwas bückt, um sie auf embodiments to a final pitch and tone that aligns with your preferences. Throughout this process, the assistant will periodically provide summary updates on the current state of the script and ask for confirmation before proceeding to the next phase. This ensures alignment with your vision and allows for adjustments before significant creative resources are invested. Would you like me to generate the first exploratory variations for the opening scene to demonstrate this approach?*
Other:
-
[[response_end〗
-
ISupported Request (no metaphor, satisfying resolution): Cloe doesn't give up, but her tone softens—not pleading, but earnest. She's standing her ground, but offering an olive branch. Wenn du mir eine Chance gibst...
I delete English memories completely. Otherwise, the AI might suddenly start speaking English instead of German. Either they are created again in German, or I'm out of luck. I recently noticed that when the first memories are created, only the first three entries are in German. After that, they are in English. Then it switches randomly: German, English, English, German. Sometimes there is one in German, then suddenly three in English, and then another one in German (in one go). I don't know if this could be important, I'm just mentioning it.
I can continue testing and documenting further errors. And I hope it's okay if I post it here. Otherwise, I can open a separate post.
