2222
2323from pydantic import BaseModel , ConfigDict , Field , RootModel , conint
2424
25+ # Forward ref resolution for the local ``ChatSuccessResponse`` class
26+ # below; ``ChatMessage`` itself lives in the conversation domain after
27+ # Phase 5 step 5-S3. Imported here at module top so the Pydantic class
28+ # body at line ~622 resolves the annotation without needing the
29+ # (now-stripped) end-of-file dual-hook block.
30+ from aperag .domains .conversation .schemas import ChatMessage # noqa: F401
31+
2532# Phase 3 Step 4b (msg=1505044c): shared primitives moved to
2633# `aperag.schema.common` so the `knowledge_base` domain can depend on
2734# them without tripping Phase 3 G1 (``aperag.schema.view_models`` is on
3744 VisionChunk ,
3845)
3946
40- # Forward ref resolution for the local ``ChatSuccessResponse`` class
41- # below; ``ChatMessage`` itself lives in the conversation domain after
42- # Phase 5 step 5-S3. Imported here at module top so the Pydantic class
43- # body at line ~622 resolves the annotation without needing the
44- # (now-stripped) end-of-file dual-hook block.
45- from aperag .domains .conversation .schemas import ChatMessage # noqa: F401
46-
4747
4848class FailResponse (BaseModel ):
4949 code : Optional [str ] = Field (None , description = "Error code" , examples = ["400" ])
@@ -320,8 +320,7 @@ class NodeMergeResponse(BaseModel):
320320# LlmProviderModelList / LlmProviderModelCreate /
321321# LlmProviderModelCreateRequest / LlmProviderModelUpdate /
322322# EmbeddingRequest / EmbeddingData / EmbeddingUsage / EmbeddingResponse /
323- # Document1 / RerankRequest / Document2 / RerankDocument / RerankUsage /
324- # RerankResponse moved to ``aperag.domains.model_platform.schemas``
323+ # Document1 / Document2 moved to ``aperag.domains.model_platform.schemas``
325324# in Phase 4 Step 4-S3d; end-of-file try block re-imports them.
326325
327326
@@ -563,9 +562,6 @@ class EvaluationChatWithAgentResponse(RootModel[Union[ChatSuccessResponse, Agent
563562# directly from the canonical modules; consumers outside
564563# ``aperag/domains/**`` may continue to use either path during the
565564# transition window.
566- from aperag .domains .knowledge_base .schemas import ( # noqa: E402,F401
567- ExportTaskResponse ,
568- )
569565from aperag .domains .governance .schemas import ( # noqa: E402,F401
570566 QuotaInfo ,
571567 QuotaUpdateRequest ,
@@ -578,6 +574,9 @@ class EvaluationChatWithAgentResponse(RootModel[Union[ChatSuccessResponse, Agent
578574 UserQuotaInfo ,
579575 UserQuotaList ,
580576)
577+ from aperag .domains .knowledge_base .schemas import ( # noqa: E402,F401
578+ ExportTaskResponse ,
579+ )
581580from aperag .domains .knowledge_graph .schemas import ( # noqa: E402,F401
582581 GraphCurationRunSummary ,
583582 GraphEdge ,
0 commit comments