Skip to content

Commit

Permalink
Fix: melhora função gpt_ler
Browse files Browse the repository at this point in the history
  • Loading branch information
jjesusfilho authored Aug 3, 2024
1 parent c06d56d commit bce713f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions R/gpt_ler.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ gpt_ler <- function (arquivos, colunas = NULL)
purrr::map_dfr(arquivos, purrr::possibly(~{

nome_arquivo <- basename(.x)

.x |>
.x |>
readLines() |>
stringr::str_subset("```", negate = T) |>
stringr::str_c(collapse = "\n") |>
jsonlite::fromJSON() |>
purrr::map_if(rlang::is_empty, \(x) NA_character_) |>
as.data.frame() |>
Expand Down

0 comments on commit bce713f

Please sign in to comment.