sync: 鍚屾灞€鍩熺綉鏈€鏂颁唬鐮?(source master @ b69568e4)

This commit is contained in:
gozeros committed 2026-10-21 14:51:31 +08:00
1 parent 4f7f07504a
commit 8bc8b0e082
1651 files changed
+278599 -11416

No files matched your search

@@ -6,11 +6,47 @@ from abc import ABC, abstractmethod
from typing import Any, Literal
LlmWikiScope = Literal["personal", "public", "all"]
UNSET = object()
def serialize_wiki_parent_directories(
value: list[str] | None,
) -> list[str] | None:
return None if value is None else [str(item) for item in value]
def serialize_wiki_directory_paths(
value: list[list[str]] | None,
) -> list[list[str]] | None:
return (
None
if value is None
else [[str(segment) for segment in path] for path in value]
)
class LlmWikiStore(ABC):
@abstractmethod
async def create_mapping(self, *, weknora_id: str, owner_user_id: str, name: str, description: str, kb_type: str) -> dict[str, Any]: ...
async def create_mapping(
self,
*,
weknora_id: str,
owner_user_id: str,
name: str,
description: str,
kb_type: str,
retrieval_settings: dict[str, Any] | None = None,
wiki_parent_directories: list[str] | None = None,
wiki_directory_paths: list[list[str]] | None = None,
wiki_focus_instructions: str | None = None,
wiki_content_instructions_raw: str | None = None,
wiki_extraction_instructions_raw: str | None = None,
wiki_generation_managed: bool | None = None,
wiki_config_schema_version: int | None = None,
wiki_config_revision: int | None = None,
wiki_config_apply_status: str | None = None,
wiki_config_apply_error: str | None = None,
) -> dict[str, Any]: ...
@abstractmethod
async def list_visible(self, user_id: str, *, scope: LlmWikiScope = "all", is_admin: bool = False) -> list[dict[str, Any]]: ...
@@ -28,8 +64,21 @@ class LlmWikiStore(ABC):
*,
name: str | None = None,
description: str | None = None,
test_questions: list[str] | None = None,
test_questions_set: bool = False,
retrieval_settings: dict[str, Any] | None = None,
wiki_index_enabled: bool | None = None,
external_search_enabled: bool | None = None,
wiki_parent_directories: list[str] | None | object = UNSET,
wiki_directory_paths: list[list[str]] | None | object = UNSET,
wiki_focus_instructions: str | None | object = UNSET,
wiki_content_instructions_raw: str | None | object = UNSET,
wiki_extraction_instructions_raw: str | None | object = UNSET,
wiki_generation_managed: bool | None | object = UNSET,
wiki_config_schema_version: int | None | object = UNSET,
wiki_config_revision: int | None | object = UNSET,
wiki_config_apply_status: str | None | object = UNSET,
wiki_config_apply_error: str | None | object = UNSET,
) -> dict[str, Any] | None: ...
@abstractmethod