Skip to main content

Classes

CLASS Instruction

The Instruction in an instruct/validate/repair loop.
Methods:

FUNC parts

parts(self)
Returns all of the constituent parts of an Instruction.

FUNC format_for_llm

format_for_llm(self) -> TemplateRepresentation
Formats the instruction for Formatter use.

FUNC apply_user_dict_from_jinja

apply_user_dict_from_jinja(user_dict: dict[str, str], s: str) -> str
Treats s as a jinja string and user_dict as the template values dictionary.

FUNC requirements

requirements(self) -> list[Requirement]
Returns a list of Requirement instances.

FUNC copy_and_repair

copy_and_repair(self, repair_string: str) -> Instruction
Creates a copy of the instruction and adds/overwrites the repair string.