Prompty#

class langchain_prompty.core.Prompty[source]#

Bases: BaseModel

Base Prompty model.

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.

param authors: List[str] = []#
param base: str = ''#
param basePrompty: Prompty | None = None#
param content: str = ''#
param description: str = ''#
param file: FilePath = ''#
Constraints:
  • path_type = file

param inputs: Dict[str, PropertySettings] = {}#
param model: ModelSettings [Optional]#
param name: str = ''#
param outputs: Dict[str, PropertySettings] = {}#
param sample: dict = {}#
param tags: List[str] = []#
param template: TemplateSettings [Required]#
param version: str = ''#
static normalize(attribute: Any, parent: Path, env_error: bool = True) Any[source]#
Parameters:
  • attribute (Any)

  • parent (Path)

  • env_error (bool)

Return type:

Any

to_safe_dict() Dict[str, Any][source]#
Return type:

Dict[str, Any]

to_safe_json() str[source]#
Return type:

str