This function constructs a detailed prompt for the AI model, providing the decision context, available data, and recipe catalogue. It then calls the language model to generate the QMD content based on the provided information.

.generate_decision_qmd_with_ai(apsimx_file, qmd_doc, use_cache = TRUE)

Arguments

apsimx_file

Character scalar path to the APSIMX file used in the analysis.

qmd_doc

Character scalar containing the QMD document template.

use_cache

Logical scalar indicating whether to use cached AI responses if available.

Value

Character scalar containing the generated QMD content.