From 5e20359d84f723b3acb228ab77b010134bb08b9e Mon Sep 17 00:00:00 2001 From: sudoskys Date: Sat, 28 Sep 2024 13:32:55 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(controller):=20add=20option=20?= =?UTF-8?q?to=20hide=20long=20text=20in=20tagger=20response?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added `hidden_long_text` parameter to `tagger` method to control the display of long text responses. Updated relevant method calls to include the new parameter. --- app/controller.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controller.py b/app/controller.py index 13e560a..0400ca1 100755 --- a/app/controller.py +++ b/app/controller.py @@ -32,6 +32,8 @@ async def read_a111(file: BytesIO): parameter = img.info.get("parameters", None) if not parameter: raise Exception("Empty Parameter") + if isinstance(parameter, str): + parameter = parameter.replace("\n\n", "\n") except Exception as e: logger.debug(f"Error {e}") return []