Skip to main content

prompt

Send a prompt to the AI and get a response.

Note: for document types covered by the specialized parsers (parse_nfe, parse_boleto, parse_bank_statement, ...), prefer those. For other text-heavy documents (contracts, reports, official letters), prefer extracting the text first with extract_text and passing the resulting string — more reliable than passing the document Path directly. Pass file Paths directly only for visual content (photos, screenshots, layouts).

Raises:

ValueError: If temperature is not between 0.0 and 2.0.

Parameters

NameDescriptionTypeDefault
prompt (required)The prompt(s) to send to the AI model.Union[Prompt, List[Prompt]]None
instructionsAdditional instructions for the AI. Defaults to [].Union[str, List[str]][]
formatThe expected format for the AI response. Defaults to None.FormatNone
temperatureDeprecated — our most capable models run at a fixed temperature and ignore this value. Range 0.0 to 2.0; defaults to 1.0.float1.0

Return Value

Any