diff --git a/DESCRIPTION b/DESCRIPTION index bfb4f25..55eec5f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: minutemaker Title: GenAI-based meeting and conferences minutes generator -Version: 0.5.1 +Version: 0.5.2 Authors@R: person("Angelo", "D'Ambrosio", , "a.dambrosioMD@gmail.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-2045-5155")) diff --git a/R/prompts.R b/R/prompts.R index cb46c7d..652b648 100644 --- a/R/prompts.R +++ b/R/prompts.R @@ -260,6 +260,11 @@ generate_summarisation_prompt <- function( args$extra_output_instructions ) + # Remove extra_output_instructions since it would trigger the length check + # later + args$extra_output_instructions <- NULL + + # Collapse output instruction into a bullet point list args$output_instructions <- paste0( "- ", args$output_instructions, @@ -270,6 +275,19 @@ generate_summarisation_prompt <- function( args$output_length <- "3" } + # Aggregate arguments if length > 1 vectors + if (length(args$extra_diarization_instructions) > 1) { + args$extra_diarization_instructions <- paste( + args$extra_diarization_instructions, collapse = "\n" + ) + } + + if (length(args$summary_structure) > 1) { + args$summary_structure <- paste( + args$summary_structure, collapse = "\n" + ) + } + prompt <- paste( get_prompts("base_task"), @@ -355,6 +373,11 @@ generate_rolling_aggregation_prompt <- function( args$extra_output_instructions ) + # Remove extra_output_instructions since it would trigger the length check + # later + args$extra_output_instructions <- NULL + + # Collapse output instruction into a bullet point list args$output_instructions <- paste0( "- ", args$output_instructions, @@ -365,6 +388,13 @@ generate_rolling_aggregation_prompt <- function( args$output_length <- "3" } + # Aggregate arguments if length > 1 vectors + if (length(args$summary_structure) > 1) { + args$summary_structure <- paste( + args$summary_structure, collapse = "\n" + ) + } + summary_seq <- seq_along(summaries) summaries <- stringr::str_glue(