mirror of
https://github.com/Paillat-dev/viralfactory.git
synced 2026-01-02 09:16:19 +00:00
🎨 Run linter
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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":
|
||||||
|
|||||||
Reference in New Issue
Block a user