Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
hauselin committed Aug 5, 2024
1 parent afff36f commit d6d4bfa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/ollama.R
Original file line number Diff line number Diff line change
Expand Up @@ -892,10 +892,10 @@ ohelp <- function(model = "codegemma:7b", ...) {
if (!model_avail(model)) {
return(invisible())
}

messages <- list()
n_messages <- 0
cat("Say something or type /q to quit or end the conversation.\n\n")

n_messages <- 0
opts <- list(...)
if (length(opts) > 0) {
if (opts$first_prompt == "quit") {
Expand All @@ -909,7 +909,7 @@ ohelp <- function(model = "codegemma:7b", ...) {
if (n_messages == 0) {
messages <- create_message(prompt, role = "user")
} else {
messages <- append(messages, create_message(prompt, role = "user"))
messages <- append_message(prompt, "user", messages)
}
n_messages <- n_messages + 1
response <- chat(model, messages = messages, output = "text", stream = TRUE)
Expand Down

0 comments on commit d6d4bfa

Please sign in to comment.