From 4d763f419b76424d318b2323d99b286053f630a1 Mon Sep 17 00:00:00 2001 From: Tropfchen <6117944+Tropfchen@users.noreply.github.com> Date: Sat, 21 Oct 2023 23:49:28 +0200 Subject: [PATCH] fix letting user type too low or high emphasis --- node.py | 1 + 1 file changed, 1 insertion(+) diff --git a/node.py b/node.py index 708817f..ae71655 100644 --- a/node.py +++ b/node.py @@ -39,6 +39,7 @@ class EmbeddingPicker: CATEGORY = "utils" def concat_embedding(self, text, embedding, emphasis, append): + emphasis = min(max(emphasis, 0.001), 3) emb = "embedding:" + Path(embedding).stem emphasis = f"{emphasis:.3f}"