class Prompt

source code

properties


__fields_set__

source code

def __fields_set__(self) -> set[str]:

model_extra

source code

def model_extra(self) -> dict[str, Any] | None:

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to "allow".


model_fields_set

source code

def model_fields_set(self) -> set[str]:

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set, i.e. that were not filled from defaults.

methods


full_repr

source code

def full_repr(self):

Return the full un-pruned representation, regardless of the mode currently set.

dunder_methods


__add__

source code

def __add__(self, other):

__hash__

source code

def __hash__(self):

__init__

source code

def __init__(
        self,
        user_message: Optional[str] = None,
        system_message: Optional[str] = None,
        **kwargs,
    ):

Create Prompt instance.

Arguments:

  • user_message - The user message, optional.
  • system_message - The system message, optional.
  • kwargs - All fields expressed in the pydantic type.

Returns:

The pydantic Prompt instance.


__radd__

source code

def __radd__(self, other):

__rich_repr__

source code

def __rich_repr__(self):

__rsub__

source code

def __rsub__(self, other):

__str__

source code

def __str__(self) -> str:

__sub__

source code

def __sub__(self, other):