Update random choice
This commit is contained in:
parent
55ae54f0a3
commit
92020c4bbc
@ -22,7 +22,8 @@ class DOC_RandomPromptChoice:
|
|||||||
prompts = [v for v in kwargs.values() if v.strip()]
|
prompts = [v for v in kwargs.values() if v.strip()]
|
||||||
if not prompts:
|
if not prompts:
|
||||||
return ("",)
|
return ("",)
|
||||||
choice = random.choice(prompts)
|
sysrand = random.SystemRandom()
|
||||||
|
choice = sysrand.choice(prompts)
|
||||||
idx = prompts.index(choice) + 1
|
idx = prompts.index(choice) + 1
|
||||||
print(f"[DOC_RandomPromptChoice] Scelta #{idx}: '{choice[:20]}'")
|
print(f"[DOC_RandomPromptChoice] Scelta #{idx}: '{choice[:20]}'")
|
||||||
return (choice,)
|
return (choice,)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user