agents.reflection.models¶
Models for reflection agent outputs and configurations.
Classes¶
Structured critique of an output (for structured output pattern). |
|
Configuration for expert agents. |
|
Comprehensive grading result for a response. |
|
An improvement to a response based on reflection. |
|
A specific improvement suggestion. |
|
Simple quality score for respo, field_validatorses. |
|
Configuration for reflection process. |
|
Output from reflection process (unstructured). |
|
Complete reflection analysis (for structured output pattern). |
Functions¶
|
Convert object to prompt string. |
|
Validate grade matches score (compatibility function). |
Module Contents¶
- class agents.reflection.models.Critique(/, **data)¶
Bases:
pydantic.BaseModel
Structured critique of an output (for structured output pattern).
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- class agents.reflection.models.ExpertiseConfig(/, **data)¶
Bases:
pydantic.BaseModel
Configuration for expert agents.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- class agents.reflection.models.GradingResult(/, **data)¶
Bases:
pydantic.BaseModel
Comprehensive grading result for a response.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- classmethod validate_grade_matches_score(v)¶
Ensure letter grade matches overall score.
- Return type:
Any
- class agents.reflection.models.Improvement(/, **data)¶
Bases:
pydantic.BaseModel
An improvement to a response based on reflection.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- class agents.reflection.models.ImprovementSuggestion(/, **data)¶
Bases:
pydantic.BaseModel
A specific improvement suggestion.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- class agents.reflection.models.QualityScore(/, **data)¶
Bases:
pydantic.BaseModel
Simple quality score for respo, field_validatorses.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- class agents.reflection.models.ReflectionConfig(/, **data)¶
Bases:
pydantic.BaseModel
Configuration for reflection process.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- class agents.reflection.models.ReflectionOutput(/, **data)¶
Bases:
pydantic.BaseModel
Output from reflection process (unstructured).
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- class agents.reflection.models.ReflectionResult(/, **data)¶
Bases:
pydantic.BaseModel
Complete reflection analysis (for structured output pattern).
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- agents.reflection.models.validate_grade_matches_score(*args, **kwargs)¶
Validate grade matches score (compatibility function).