mirror of
https://github.com/langgenius/dify.git
synced 2026-10-04 13:47:55 +08:00
refactor(api): establish dataset application boundaries (#41729)
Co-authored-by: Jyong <jyong@dify.ai>
This commit is contained in:
1 parent
c005932db9
commit
a67cd87eb0
417 files changed
+30522
-23751
No files matched your search
@@ -1,7 +1,7 @@
|
||||
from enum import StrEnum
|
||||
from typing import Annotated, Literal
|
||||
from typing import Literal
|
||||
|
||||
from pydantic import AliasChoices, BaseModel, Field, WithJsonSchema
|
||||
from pydantic import AliasChoices, BaseModel, Field
|
||||
|
||||
|
||||
class ParentMode(StrEnum):
|
||||
@@ -9,19 +9,11 @@ class ParentMode(StrEnum):
|
||||
PARAGRAPH = "paragraph"
|
||||
|
||||
|
||||
PreProcessingRuleID = Annotated[
|
||||
str,
|
||||
WithJsonSchema(
|
||||
{
|
||||
"enum": ["remove_stopwords", "remove_extra_spaces", "remove_urls_emails"],
|
||||
"type": "string",
|
||||
}
|
||||
),
|
||||
]
|
||||
type PreProcessingRuleKey = Literal["remove_stopwords", "remove_extra_spaces", "remove_urls_emails"]
|
||||
|
||||
|
||||
class PreProcessingRule(BaseModel):
|
||||
id: PreProcessingRuleID = Field(description="Rule identifier.")
|
||||
id: PreProcessingRuleKey = Field(description="Rule identifier.")
|
||||
enabled: bool = Field(description="Whether this preprocessing rule is enabled.")
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user