Skip to content

PrePostPromptConfig

Base classes

Name Children Inherits
Schema
schemez.schema
Base class for configuration models.

⋔ Inheritance diagram

graph TD
  844024102["augmented.PrePostPromptConfig"]
  330168112["schema.Schema"]
  3879467795["main.BaseModel"]
  2751680898["builtins.object"]
  330168112 --> 844024102
  3879467795 --> 330168112
  2751680898 --> 3879467795

🛈 DocStrings

Bases: Schema

Configuration for pre/post prompts.

Source code in src/llmling_models/models/augmented.py
class PrePostPromptConfig(Schema):
    """Configuration for pre/post prompts."""

    text: str
    model: str | Model

    @property
    def model_instance(self) -> Model:
        """Get model instance."""
        if isinstance(self.model, str):
            return infer_model(self.model)
        return self.model

    model_config = ConfigDict(arbitrary_types_allowed=True)

model_instance property

model_instance: Model

Get model instance.

:fa-brands-github: Show source on GitHub