mirror of
https://github.com/langgenius/dify.git
synced 2026-02-17 10:01:42 -05:00
refactor(workflow-file): move core.file to core.workflow.file (#32252)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -94,6 +94,10 @@ class Storage:
|
||||
@overload
|
||||
def load(self, filename: str, /, *, stream: Literal[True]) -> Generator: ...
|
||||
|
||||
# Keep a bool fallback overload for callers that forward a runtime bool flag.
|
||||
@overload
|
||||
def load(self, filename: str, /, *, stream: bool = False) -> Union[bytes, Generator]: ...
|
||||
|
||||
def load(self, filename: str, /, *, stream: bool = False) -> Union[bytes, Generator]:
|
||||
if stream:
|
||||
return self.load_stream(filename)
|
||||
@@ -124,3 +128,6 @@ storage = Storage()
|
||||
|
||||
def init_app(app: DifyApp):
|
||||
storage.init_app(app)
|
||||
from core.app.workflow.file_runtime import bind_dify_workflow_file_runtime
|
||||
|
||||
bind_dify_workflow_file_runtime()
|
||||
|
||||
@@ -9,9 +9,9 @@ from opentelemetry.trace import Span
|
||||
from opentelemetry.trace.status import Status, StatusCode
|
||||
from pydantic import BaseModel
|
||||
|
||||
from core.file.models import File
|
||||
from core.variables import Segment
|
||||
from core.workflow.enums import NodeType
|
||||
from core.workflow.file.models import File
|
||||
from core.workflow.graph_events import GraphNodeEventBase
|
||||
from core.workflow.nodes.base.node import Node
|
||||
from extensions.otel.semconv.gen_ai import ChainAttributes, GenAIAttributes
|
||||
|
||||
Reference in New Issue
Block a user