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 if the input data cannot be parsed to form a valid model.

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

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