From 513a5118cd2448c2c8a9e25c7196ea905aef4fa9 Mon Sep 17 00:00:00 2001 From: Timothy Eakin Date: Mon, 19 Jun 2023 15:10:20 -0400 Subject: [PATCH] Moved PromptTemplate to text.py. --- image.py | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/image.py b/image.py index 7e87a9a..8d5bf97 100644 --- a/image.py +++ b/image.py @@ -315,31 +315,6 @@ class PreviewImageTest(SaveImage): -class PromptTemplate: - """replaces the text in the given text string with a given other text at some key positions""" - - @classmethod - def INPUT_TYPES(s): - return {"required": - { - "text": ("STRING", {"multiline": True}), - "replacement": ("STRING", {"multiline": True}), - "key1": ("STRING", {"multiline": False}), - } - } - - CATEGORY = "text" - RETURN_TYPES = ("STRING",) - FUNCTION = "prompt_template_handler" - - def prompt_template_handler(self, text: str, replacement, key1): - """ - >>> PromptTemplate().prompt_template_handler("hello world", "universe", "world") - 'hello universe' - """ - return (text.replace(key1, replacement),) - - class LoadImage: @classmethod def INPUT_TYPES(s):