| embed_text | R Documentation |
Generate Embeddings
embed_text(
text,
model = NULL,
server = NULL,
truncate = NULL,
dimensions = NULL,
keep_alive = NULL,
model_params = NULL,
verbose = getOption("rollama_verbose", default = interactive())
)
text |
text vector to generate embeddings for. |
model |
which model to use. See https://ollama.com/library for options. Default is "llama3.1". Set option(rollama_model = "modelname") to change default for the current session. See pull_model for more details. |
server |
URL to one or several Ollama servers (not the API). Defaults to "http://localhost:11434". |
truncate |
whether to truncate the input to fit within the model's
context length ( |
dimensions |
the desired number of dimensions in the embedding output. Only available for models that support it. |
keep_alive |
controls how long the model is kept in memory after the
request. Accepts a duration string such as |
model_params |
a named list of additional model parameters listed in the documentation for the Modelfile. |
verbose |
Whether to print status messages to the Console
( |
a tibble with embeddings.
## Not run:
embed_text(c(
"Here is an article about llamas...",
"R is a language and environment for statistical computing and graphics."))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.