Skip to content

LLMConvert

LLMConvert

Bases: ConvertOp

This is the base class for convert operations which use an LLM to generate the output fields.

__init__

__init__(
    model: Model,
    prompt_strategy: PromptStrategy = PromptStrategy.COT_QA,
    *args,
    **kwargs,
)

LLMConvertBonded

Bases: LLMConvert

convert

convert(
    candidate: DataRecord, fields: dict[str, Field]
) -> tuple[dict[str, list], GenerationStats]