mirror of
https://github.com/langgenius/dify.git
synced 2026-11-13 23:06:40 +08:00
feat: KnowledgeFS and New Knowledge (#44165)
Co-authored-by: Jyong <76649700+JohnJyong@users.noreply.github.com> Co-authored-by: hjlarry <hjlarry@163.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: zhaohao1004 <zhaohao1004@gmail.com> Co-authored-by: yyh <yuanyouhuilyz@gmail.com> Co-authored-by: FFXN <lizy@dify.ai>
This commit is contained in:
1480 files changed
+312818
-3239
No files matched your search
@@ -5,6 +5,7 @@ from dataclasses import dataclass
|
||||
from enum import Enum
|
||||
from typing import TYPE_CHECKING, Any, Literal, Protocol, cast, overload, override
|
||||
|
||||
from flask import current_app
|
||||
from pydantic import JsonValue
|
||||
from sqlalchemy import select
|
||||
from sqlalchemy.orm import Session, sessionmaker
|
||||
@@ -574,6 +575,7 @@ class DifyToolNodeRuntime(ToolNodeRuntimeProtocol):
|
||||
else None
|
||||
),
|
||||
)
|
||||
tool_runtime.runtime.dify_run_context = self._run_context
|
||||
except ToolNodeError:
|
||||
raise
|
||||
except Exception as exc:
|
||||
@@ -1057,3 +1059,9 @@ def build_dify_llm_file_saver(
|
||||
file_reference_factory=DifyFileReferenceFactory(run_context),
|
||||
http_client=http_client,
|
||||
)
|
||||
|
||||
|
||||
def build_knowledge_fs_node_dependencies() -> dict[str, object]:
|
||||
"""Resolve the retrieval capabilities registered by the application composition root."""
|
||||
factory = cast(Callable[[], dict[str, object]], current_app.extensions["knowledge_fs_node_dependencies"])
|
||||
return factory()
|
||||
Reference in new issue
Block a user