// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ExtractionRequest {
    pub document: ClassificationRequestDocumentOneOf,
    /// JSON schema describing the structured output
    pub json_schema: std::collections::HashMap<String, serde_json::Value>,
    /// The model to use for the extraction
    ///
    /// Defaults to `retab-small`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub model: Option<String>,
    /// Resolution of the image sent to the LLM
    ///
    /// Defaults to `192`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub image_resolution_dpi: Option<i64>,
    /// Free-form instructions appended to the system prompt to steer the extraction.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub instructions: Option<String>,
    /// Number of consensus extraction runs to perform. Uses deterministic single-pass when set to 1.
    ///
    /// Defaults to `1`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub n_consensus: Option<i64>,
    /// User-defined metadata to associate with this extraction
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub metadata: Option<std::collections::HashMap<String, String>>,
    /// Additional chat messages forwarded to the extraction model.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub additional_messages: Option<Vec<std::collections::HashMap<String, serde_json::Value>>>,
    /// If true, skip the LLM cache and force a fresh completion
    ///
    /// Defaults to `false`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub bust_cache: Option<bool>,
    /// Defaults to `false`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub stream: Option<bool>,
}
