aixplain.v2.inspector
Inspector module for v2 API - Team agent inspection and validation.
This module provides inspector functionality for validating team agent operations at different stages (input, steps, output) with custom policies.
InspectorTarget Objects
class InspectorTarget(str, Enum)
Target stages for inspector validation in the team agent pipeline.
__str__
def __str__() -> str
Return the string value of the enum.
InspectorAction Objects
class InspectorAction(str, Enum)
Actions an inspector can take when evaluating content.
InspectorOnExhaust Objects
class InspectorOnExhaust(str, Enum)
Action to take when max retries are exhausted.
InspectorSeverity Objects
class InspectorSeverity(str, Enum)
Severity level for inspector findings.
EvaluatorType Objects
class EvaluatorType(str, Enum)
Type of evaluator or editor.
InspectorActionConfig Objects
@dataclass
class InspectorActionConfig()
Inspector action configuration.
__post_init__
def __post_init__() -> None
Validate that max_retries and on_exhaust are only used with RERUN.
to_dict
def to_dict() -> Dict[str, Any]
Convert the action config to a dictionary for API serialization.
from_dict
@classmethod
def from_dict(cls, data: Dict[str, Any]) -> "InspectorActionConfig"
Create an InspectorActionConfig from a dictionary.
EvaluatorConfig Objects
@dataclass
class EvaluatorConfig()
Evaluator configuration for an inspector.
__post_init__
def __post_init__() -> None
Validate and convert callable functions to source strings.
to_dict
def to_dict() -> Dict[str, Any]
Convert to a dictionary for API serialization.
from_dict
@classmethod
def from_dict(cls, data: Dict[str, Any]) -> "EvaluatorConfig"
Create an EvaluatorConfig from a dictionary.
EditorConfig Objects
@dataclass
class EditorConfig()
Editor configuration for an inspector.
__post_init__
def __post_init__() -> None
Validate and convert callable functions to source strings.
to_dict
def to_dict() -> Dict[str, Any]
Convert to a dictionary for API serialization.
from_dict
@classmethod
def from_dict(cls, data: Dict[str, Any]) -> "EditorConfig"
Create an EditorConfig from a dictionary.
Inspector Objects
@dataclass
class Inspector()
Inspector v2 configuration object.
__post_init__
def __post_init__() -> None
Validate inspector configuration after initialization.
to_dict
def to_dict() -> Dict[str, Any]
Convert the inspector to a dictionary for API serialization.
from_dict
@classmethod
def from_dict(cls, data: Dict[str, Any]) -> "Inspector"
Create an Inspector from a dictionary.