Skip to content

Models

infra.llm.providers.llama_parser.models

Summary

Pydantic models for statement extraction results.


Define the transaction schema returned by LlamaCloud extraction and the default extraction configuration.

Classes

Direction

Bases: str, Enum

Transaction direction.

Attributes:

Name Type Description
DEBIT str

Debit transaction direction.

CREDIT str

Credit transaction direction.

RawExpense

Bases: BaseModel

A single extracted statement transaction.

Attributes:

Name Type Description
date str

Expense date as DD-MM-YYYY.

amount float

Transaction amount.

balance float

Account balance after transaction.

description str

Complete reconstructed transaction description.

raw_lines List[str]

Raw OCR/text lines that form this transaction.

direction Direction

Either DEBIT or CREDIT.

Statement

Bases: BaseModel

Extraction result containing parsed transactions.

Attributes:

Name Type Description
transactions List[RawExpense]

Extracted transactions.