Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in map(): ℹ In index: 1. Caused by error in strsplit(): #36

Open
YavuzMehmet2 opened this issue Feb 3, 2025 · 0 comments
Open

Comments

@YavuzMehmet2
Copy link

YavuzMehmet2 commented Feb 3, 2025

Hi all,

Many thanks for your work on the package, I closely follow it and use it. I am using the rollama package in the current google colab version of R and CRAN version of Rollama. When I use llama3.1:70b-instruct-q5_1 get an error saying Error in map(): ℹ In index: 1. Caused by error in strsplit(): regardless of the task.


ping_ollama()
▶ Ollama (v0.5.7) is running at <http://localhost:11434/>!

`options(rollama_model = "llama3.1:70b-instruct-q5_1")
✔ model llama3.1:70b-instruct-q5_1 pulled succesfully

query("Are you there?")

`Error in `map()`:
ℹ In index: 1.
Caused by error in `strsplit()`:
! non-character argument
Traceback:

1. purrr::walk(res, function(r) {
 .     screen_answer(purrr::pluck(r, "message", "content"), purrr::pluck(r, 
 .         "model"))
 . })
2. map(.x, .f, ..., .progress = .progress)
3. map_("list", .x, .f, ..., .progress = .progress)
4. with_indexed_errors(i = i, names = names, error_call = .purrr_error_call, 
 .     call_with_cleanup(map_impl, environment(), .type, .progress, 
 .         n, names, i))
5. withCallingHandlers(expr, error = function(cnd) {
 .     if (i == 0L) {
 .     }
 .     else {
 .         message <- c(i = "In index: {i}.")
 .         if (!is.null(names) && !is.na(names[[i]]) && names[[i]] != 
 .             "") {
 .             name <- names[[i]]
 .             message <- c(message, i = "With name: {name}.")
 .         }
 .         else {
 .             name <- NULL
 .         }
 .         cli::cli_abort(message, location = i, name = name, parent = cnd, 
 .             call = error_call, class = "purrr_error_indexed")
 .     }
 . })
6. call_with_cleanup(map_impl, environment(), .type, .progress, 
 .     n, names, i)
7. .f(.x[[i]], ...)
8. screen_answer(purrr::pluck(r, "message", "content"), purrr::pluck(r, 
 .     "model"))
9. unlist(strsplit(x, "\n", fixed = TRUE))
10. strsplit(x, "\n", fixed = TRUE)
11. .handleSimpleError(function (cnd) 
  . {
  .     if (i == 0L) {
  .     }
  .     else {
  .         message <- c(i = "In index: {i}.")
  .         if (!is.null(names) && !is.na(names[[i]]) && names[[i]] != 
  .             "") {
  .             name <- names[[i]]
  .             message <- c(message, i = "With name: {name}.")
  .         }
  .         else {
  .             name <- NULL
  .         }
  .         cli::cli_abort(message, location = i, name = name, parent = cnd, 
  .             call = error_call, class = "purrr_error_indexed")
  .     }
  . }, "non-character argument", base::quote(strsplit(x, "\n", fixed = TRUE)))
12. h(simpleError(msg, call))
13. cli::cli_abort(message, location = i, name = name, parent = cnd, 
  .     call = error_call, class = "purrr_error_indexed")
14. rlang::abort(message, ..., call = call, use_cli_format = TRUE, 
  .     .frame = .frame)
15. signal_abort(cnd, .file)
16. signalCondition(cnd)

Nothing like this error occurs when I use llama 3.1 8b. What could be the reason?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant