clean_output {TheOpenAIR} | R Documentation |
Clean Output From Code Responses
Description
This function extracts the content from a given text string that is enclosed between the '“'' markers. It can be used to extract any kind of code or text content.
Usage
clean_output(text)
Arguments
text |
A character string containing the code or text content with '“'' markers. |
Value
A character string containing the extracted code or text content.
Author(s)
Ulrich Matter umatter@protonmail.com
Examples
code_text <- "```
example_code <- function(x) {
return(x * 2)
}
```"
clean_output(code_text)
[Package TheOpenAIR version 0.1.0 Index]