From 2511287a55f62a55e8ba6a0f854d840f715dbdad Mon Sep 17 00:00:00 2001 From: Angelo D'Ambrosio Date: Wed, 17 Apr 2024 10:28:06 +0200 Subject: [PATCH] feat: adjust output length parameter - Modified the `speech_to_summary_workflow` function to dynamically set the `summarization_output_length` based on whether a multipart summary is being generated. This change ensures that for multipart summaries, the output length per part is set to 1 page, while for single summaries it remains at 3 pages, optimizing the readability and relevance of generated summaries. --- R/data_management.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/data_management.R b/R/data_management.R index 8410537..011ec9b 100644 --- a/R/data_management.R +++ b/R/data_management.R @@ -1102,7 +1102,7 @@ add_chat_transcript <- function( #' minutes if the "rolling" method is used. See `summarise_transcript` for #' more details. #' @param summarization_output_length An indication to the LLM regarding the -#' length of the output. See `summarise_transcript` for more details. +#' length of the output in pages. See `summarise_transcript` for more details. #' @param summarization_output_file A string with the path to the output file #' where the summary tree will be written. Should be a .R file. See #' `summarise_full_meeting` for more details. @@ -1173,7 +1173,7 @@ speech_to_summary_workflow <- function( llm_provider = getOption("minutemaker_llm_provider"), extra_summarise_args = NULL, summarization_window_size = 15, - summarization_output_length = 3, + summarization_output_length = if (isTRUE(multipart_summary)) 1 else 3, summarization_method = c("simple", "rolling"), summarization_output_file = file.path(target_dir, "event_summary.R"),