Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix dev/reformat (#2542)

Jyongb03bbab5ad05
diff --git a/api/core/splitter/fixed_text_splitter.py b/api/core/splitter/fixed_text_splitter.py
index a3ce72e6cc3..a1510259ac1 100644
--- a/api/core/splitter/fixed_text_splitter.py
+++ b/api/core/splitter/fixed_text_splitter.py
@@ -8,12 +8,11 @@ from core.model_runtime.model_providers.__base.text_embedding_model import TextE
from core.model_runtime.model_providers.__base.tokenizers.gpt2_tokenzier import GPT2Tokenizer
from core.splitter.text_splitter import (
TS,
- AbstractSet,
Collection,
Literal,
RecursiveCharacterTextSplitter,
+ Set,
TokenTextSplitter,
- Type,
Union,
)
@@ -25,9 +24,9 @@ class EnhanceRecursiveCharacterTextSplitter(RecursiveCharacterTextSplitter):
@classmethod
def from_encoder(
- cls: Type[TS],
+ cls: type[TS],
embedding_model_instance: Optional[ModelInstance],
- allowed_special: Union[Literal[all], AbstractSet[str]] = set(),
+ allowed_special: Union[Literal[all], Set[str]] = set(),
disallowed_special: Union[Literal[all], Collection[str]] = "all",
**kwargs: Any,
):