From 92020c4bbcb5b568a935ca0a44df1735d2452662 Mon Sep 17 00:00:00 2001 From: Francesco Bellini Date: Tue, 7 Oct 2025 21:41:02 +0200 Subject: [PATCH] Update random choice --- nodes/DOC_RandomPromptChoice.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nodes/DOC_RandomPromptChoice.py b/nodes/DOC_RandomPromptChoice.py index 22daf8a..5533be4 100644 --- a/nodes/DOC_RandomPromptChoice.py +++ b/nodes/DOC_RandomPromptChoice.py @@ -22,7 +22,8 @@ class DOC_RandomPromptChoice: prompts = [v for v in kwargs.values() if v.strip()] if not prompts: return ("",) - choice = random.choice(prompts) + sysrand = random.SystemRandom() + choice = sysrand.choice(prompts) idx = prompts.index(choice) + 1 print(f"[DOC_RandomPromptChoice] Scelta #{idx}: '{choice[:20]}'") return (choice,)