Skip to content

Commit

Permalink
🔧 chore(dependencies): update dependencies in pyproject.toml
Browse files Browse the repository at this point in the history
🔨 refactor(event): remove unused AnimeIDF and related code

🚀 feat(controller): add new message handlers for various commands

♻️ refactor(controller): simplify tagger function and markdown replies
  • Loading branch information
sudoskys committed Dec 25, 2024
1 parent c65d674 commit 880d1aa
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
5 changes: 4 additions & 1 deletion app/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
# @Time : 2023/11/18 上午12:18
# @File : controller.py
# @Software: PyCharm
import json
from io import BytesIO

import json_repair
import telegramify_markdown
from PIL import Image
from loguru import logger
Expand Down Expand Up @@ -99,9 +101,10 @@ async def read_comfyui(file: BytesIO):
parameter = img.info.get("prompt")
if not parameter:
raise Exception("Empty Parameter")
decoded_object = json_repair.loads(parameter)
return [
formatting.mbold("📦 Comfyui", escape=False),
code(content=parameter, language="txt"),
code(content=json.dumps(decoded_object, indent=2), language="txt"),
]
except Exception as e:
logger.debug(f"Error {e}")
Expand Down
10 changes: 5 additions & 5 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ dependencies = [
"aiofiles>=23.2.1",
"novelai-python>=0.7.0",
"telegramify-markdown>=0.3.0",
"json-repair>=0.33.0",
]


Expand Down Expand Up @@ -95,3 +96,5 @@ skip-magic-trailing-comma = false

# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"

[tool.pdm]

0 comments on commit 880d1aa

Please sign in to comment.