From 77ae1e9a27165ec0c368165c80824671ef62e214 Mon Sep 17 00:00:00 2001 From: SimonOriginal Date: Sat, 29 Jun 2024 13:00:33 +0200 Subject: [PATCH] Remove caching --- examples/filters/google_translation_filter_pipeline.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/filters/google_translation_filter_pipeline.py b/examples/filters/google_translation_filter_pipeline.py index d4627b7..87ebcee 100644 --- a/examples/filters/google_translation_filter_pipeline.py +++ b/examples/filters/google_translation_filter_pipeline.py @@ -54,7 +54,7 @@ class Pipeline: async def on_valves_updated(self): pass - @lru_cache(maxsize=128) # LRU cache to store translation results + # @lru_cache(maxsize=128) # LRU cache to store translation results def translate(self, text: str, source: str, target: str) -> str: url = "https://translate.googleapis.com/translate_a/single" params = { @@ -90,7 +90,7 @@ class Pipeline: def clean_table_delimiters(self, text: str) -> str: # Remove extra spaces from table delimiters - return re.sub(r'(\|\s*-+\s*)+', lambda m: m.group(0).replace(' ', ''), text) + return re.sub(r'(\|\s*-+\s*)+', lambda m: m.group(0).replace(' ', '-'), text) async def inlet(self, body: dict, user: Optional[dict] = None) -> dict: print(f"inlet:{__name__}")