🎨 Run linter

This commit is contained in:
2024-04-21 22:00:06 +02:00
parent f3db42e341
commit 0da6b1a518
2 changed files with 8 additions and 3 deletions

View File

@@ -61,7 +61,9 @@ class AnthropicLLMEngine(BaseLLMEngine):
returnable = fix_busted_json.repair_json(content) returnable = fix_busted_json.repair_json(content)
returnable = orjson.loads(returnable) returnable = orjson.loads(returnable)
return 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 tries += 1
else: else:
return content return content

View File

@@ -76,8 +76,11 @@ class ScriptedVideoPipeline(BasePipeline):
chat = chat.replace("{assets_instructions}", str(self.assets_instructions)) chat = chat.replace("{assets_instructions}", str(self.assets_instructions))
chat = chat.replace("{video_transcript}", str(ctx.timed_script)) chat = chat.replace("{video_transcript}", str(ctx.timed_script))
assets: list[dict[str, str | float]] = ctx.powerfulllmengine.generate( assets: list[dict[str, str | float]] = ctx.powerfulllmengine.generate(
system_prompt=system, chat_prompt=chat, temperature=1, max_tokens=4096, system_prompt=system,
json_mode=True chat_prompt=chat,
temperature=1,
max_tokens=4096,
json_mode=True,
)["assets"] )["assets"]
for asset in assets: for asset in assets:
if asset["type"] == "stock": if asset["type"] == "stock":