plexus.core.ScoreInput module

Lightweight Score.Input class definition.

This module contains only the Score.Input class without any heavyweight dependencies, allowing it to be imported without triggering psycopg or other complex imports.

class plexus.core.ScoreInput.ScoreInput(*, text: str, metadata: dict = {}, results: List[Any] | None = None)

Bases: BaseModel

Standard input structure for all Score classifications in Plexus.

The Input class standardizes how content is passed to Score classifiers, supporting both the content itself and contextual metadata.

Attributes:

text: The content to classify. Can be a transcript, document, etc. metadata: Additional context like source, timestamps, or tracking IDs results: Optional list of previous classification results

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.

metadata: dict
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

results: List[Any] | None
text: str