From 0da6b1a518d88f0f50dd4389cb6036645f225351 Mon Sep 17 00:00:00 2001 From: Paillat Date: Sun, 21 Apr 2024 22:00:06 +0200 Subject: [PATCH] :art: Run linter --- src/engines/LLMEngine/AnthropicLLMEngine.py | 4 +++- src/engines/Pipelines/ScriptedVideoPipeline.py | 7 +++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/engines/LLMEngine/AnthropicLLMEngine.py b/src/engines/LLMEngine/AnthropicLLMEngine.py index 981bb65..0f0065d 100644 --- a/src/engines/LLMEngine/AnthropicLLMEngine.py +++ b/src/engines/LLMEngine/AnthropicLLMEngine.py @@ -61,7 +61,9 @@ class AnthropicLLMEngine(BaseLLMEngine): returnable = fix_busted_json.repair_json(content) returnable = orjson.loads(returnable) return returnable - except Exception as e: # noqa wait for library to imlement pep https://peps.python.org/pep-0352/ (Required Superclass for Exceptions + except ( + Exception + ) as e: # noqa wait for library to imlement pep https://peps.python.org/pep-0352/ (Required Superclass for Exceptions tries += 1 else: return content diff --git a/src/engines/Pipelines/ScriptedVideoPipeline.py b/src/engines/Pipelines/ScriptedVideoPipeline.py index a20684c..1bf343d 100644 --- a/src/engines/Pipelines/ScriptedVideoPipeline.py +++ b/src/engines/Pipelines/ScriptedVideoPipeline.py @@ -76,8 +76,11 @@ class ScriptedVideoPipeline(BasePipeline): chat = chat.replace("{assets_instructions}", str(self.assets_instructions)) chat = chat.replace("{video_transcript}", str(ctx.timed_script)) assets: list[dict[str, str | float]] = ctx.powerfulllmengine.generate( - system_prompt=system, chat_prompt=chat, temperature=1, max_tokens=4096, - json_mode=True + system_prompt=system, + chat_prompt=chat, + temperature=1, + max_tokens=4096, + json_mode=True, )["assets"] for asset in assets: if asset["type"] == "stock":