Skip to content

Commit

Permalink
Update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
hauselin committed May 14, 2024
1 parent d1a9518 commit e1c5cc4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/model_options.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' Model options
model_options <- list(
mirostat = list(
description = "Enable Mirostat sampling for controlling perplexity.",
description = "Enable Mirostat sampling for controlling perplexity. (default: 0, 0 = disabled, 1 = Mirostat, 2 = Mirostat 2.0)",
default_value = 0
),
mirostat_eta = list(
Expand All @@ -17,7 +17,7 @@ model_options <- list(
default_value = 2048
),
repeat_last_n = list(
description = "Sets how far back for the model to look back to prevent repetition.",
description = "Sets how far back for the model to look back to prevent repetition. (Default: 64, 0 = disabled, -1 = num_ctx)",
default_value = 64
),
repeat_penalty = list(
Expand Down
2 changes: 2 additions & 0 deletions R/ollama.R
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,8 @@ normalize <- function(x) {
#'
#' @examplesIf test_connection()$status_code == 200
#' embeddings("nomic-embed-text:latest", "The quick brown fox jumps over the lazy dog.")
#' # pass model options to the model
#' embeddings("nomic-embed-text:latest", "Hello!", temperature = 0.1, num_predict = 3)
embeddings <- function(model, prompt, normalize = TRUE, keep_alive = "5m", endpoint = "/api/embeddings", ...) {
req <- create_request(endpoint)
req <- httr2::req_method(req, "POST")
Expand Down
2 changes: 2 additions & 0 deletions man/embeddings.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e1c5cc4

Please sign in to comment.