diff --git a/R/clean_code_blocks.R b/R/clean_code_blocks.R index f119ede..589c101 100644 --- a/R/clean_code_blocks.R +++ b/R/clean_code_blocks.R @@ -1,8 +1,13 @@ #' Clean code blocks returned by the agent #' -#' This function cleans up the code blocks which -#' are returned by the agent to ensure code blocks -#' can run. +#' This function cleans up the response +#' returned by the agent to ensure code blocks +#' can run. It ensures that characters such as {r}, {R} +#' R and r are cleaned from code blocks in the agents +#' response, so that the code blocks are able to be extracted by +#' @seealso [extractCode()] and ran as expected. It also cleans +#' the response from any install.package calls, and recorded output, +#' so that when code blocks are extracted, the code can run smoothly. #' #' @param response response received from the agent #' diff --git a/man/clean_code_blocks.Rd b/man/clean_code_blocks.Rd index 540bb00..ca7c198 100644 --- a/man/clean_code_blocks.Rd +++ b/man/clean_code_blocks.Rd @@ -10,12 +10,19 @@ clean_code_blocks(response) \item{response}{response received from the agent} } \description{ -This function cleans up the code blocks which -are returned by the agent to ensure code blocks -can run. +This function cleans up the response +returned by the agent to ensure code blocks +can run. It ensures that characters such as {r}, {R} +R and r are cleaned from code blocks in the agents +response, so that the code blocks are able to be extracted by } \examples{ \dontrun{ clean_code <- clean_code_blocks(response) } } +\seealso{ +[extractCode()] and ran as expected. It also cleans +the response from any install.package calls, and recorded output, +so that when code blocks are extracted, the code can run smoothly. +}