feat: add skill and assistant knowledge bases
This commit is contained in:
1 parent
dd0ee282df
commit
fbd8dec48f
45 files changed
+5262
-21
No files matched your search
@@ -44,6 +44,7 @@ class WeKnoraConnectionConfig(BaseModel):
|
||||
repr=False,
|
||||
description=("Optional WeKnora administrator password used by DeerFlow's server-side WeKnora API client and detail-page iframe proxy. Prefer $ENV references."),
|
||||
)
|
||||
graph: WeKnoraDirectGraphConfig = Field(default_factory=lambda: WeKnoraDirectGraphConfig())
|
||||
model_config = ConfigDict(extra="ignore")
|
||||
|
||||
@field_validator("api_base_url", "web_base_url")
|
||||
@@ -52,6 +53,23 @@ class WeKnoraConnectionConfig(BaseModel):
|
||||
return normalize_service_url(value)
|
||||
|
||||
|
||||
class WeKnoraDirectGraphConfig(BaseModel):
|
||||
"""Backend-only, opt-in Neo4j transactional HTTP writer settings."""
|
||||
|
||||
direct_write_enabled: bool = False
|
||||
neo4j_http_url: str = ""
|
||||
username: str = ""
|
||||
password: str = Field(default="", repr=False)
|
||||
database: str = Field(default="neo4j", pattern=r"^[A-Za-z0-9_.-]+$")
|
||||
timeout_seconds: float = Field(default=30, gt=0, le=300)
|
||||
model_config = ConfigDict(extra="ignore")
|
||||
|
||||
@field_validator("neo4j_http_url")
|
||||
@classmethod
|
||||
def _validate_url(cls, value: str) -> str:
|
||||
return normalize_service_url(value)
|
||||
|
||||
|
||||
class LocalWikiEmbeddingConfig(BaseModel):
|
||||
enabled: bool = True
|
||||
provider: str = "openai"
|
||||
|
||||
@@ -156,6 +156,18 @@ class PromptPrefixSettings(BaseModel):
|
||||
model_config = ConfigDict(extra="ignore")
|
||||
|
||||
|
||||
class SkillKnowledgeAutoSyncSettings(BaseModel):
|
||||
"""Watcher/scheduler policy for bindings that explicitly opt in."""
|
||||
|
||||
watch_enabled: bool = True
|
||||
schedule_enabled: bool = True
|
||||
schedule_cron: str = Field(default="0 */6 * * *", min_length=5, max_length=128)
|
||||
debounce_seconds: int = Field(default=120, ge=10, le=86_400)
|
||||
write_remote_enabled: bool = True
|
||||
review_mode: Literal["required", "auto_high_confidence", "off"] = "auto_high_confidence"
|
||||
model_config = ConfigDict(extra="ignore")
|
||||
|
||||
|
||||
class AppearanceRouteParam(BaseModel):
|
||||
"""Runtime query-param descriptor for top-bar shortcut buttons.
|
||||
|
||||
@@ -501,6 +513,11 @@ class SystemSettings(BaseModel):
|
||||
concurrency_monitor: ConcurrencyMonitorSettings = Field(default_factory=ConcurrencyMonitorSettings)
|
||||
model_concurrency: ModelConcurrencySettings = Field(default_factory=ModelConcurrencySettings)
|
||||
llmwiki: LlmWikiRuntimeOverride = Field(default_factory=LlmWikiRuntimeOverride)
|
||||
skill_knowledge_auto_sync: SkillKnowledgeAutoSyncSettings = Field(default_factory=SkillKnowledgeAutoSyncSettings)
|
||||
knowledge_base_product_version: Literal["v1", "v2"] = Field(
|
||||
default="v1",
|
||||
description="v1 opens the ordinary WeKnora experience; v2 opens the DeerFlow assistant knowledge base.",
|
||||
)
|
||||
model_config = ConfigDict(extra="ignore")
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user