AS AgentScopeAPI 手册 / API Reference
类class agentscope.app.rag

DimensionPolicyError

class DimensionPolicyError(KnowledgeBaseError)
源码Source agentscope/app/rag/knowledge_base_manager/_errors.py:30–59

维度策略错误,把私有文档转化为可检索的知识。位于 agentscope.app.rag 包,继承自 KnowledgeBaseError。

Carries both the offending dimension and the manager's policy so the router can surface a precise error message without having to re-derive either side.

构造器摘要Constructor Summary

构造器Constructor说明Description
def __init__(message: str, *, requested_dimension: int, policy_dimension: int | None) -> None
初始化 `DimensionPolicyError` 实例。
Initialize the error.

构造器详情Constructor Detail

DimensionPolicyError

def __init__(message: str, *, requested_dimension: int, policy_dimension: int | None) -> None

初始化 DimensionPolicyError 实例。

Initialize the error.

参数Parameters
名称Name类型Type说明Description
messagestr消息(类型 `str`)。Human-readable error message.
requested_dimensionkwintrequested 维度(类型 `int`)。The dimension the caller asked for.
policy_dimensionkwint | None策略维度(类型 `int | None`)。The dimension the policy enforces, or `None` if the policy admits any dimension.
源码Source agentscope/app/rag/knowledge_base_manager/_errors.py:39–59
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.