feat: move audio and webscraper back to dify

This commit is contained in:
Yeuoly
2024-12-03 19:27:57 +08:00
parent 574a6c1ded
commit dcf19549cb
21 changed files with 741 additions and 34 deletions

View File

@ -1,5 +1,4 @@
from collections.abc import Generator, Mapping, Sequence
from os import path
from typing import Any, cast
from sqlalchemy import select
@ -236,8 +235,7 @@ class ToolNode(BaseNode[ToolNodeData]):
type=FileType.IMAGE,
transfer_method=FileTransferMethod.TOOL_FILE,
related_id=tool_file_id,
filename=message.save_as,
extension=path.splitext(message.save_as)[1],
extension=None,
mime_type=message.meta.get("mime_type", "application/octet-stream"),
)
)