embeddings {ollamar} | R Documentation |
Get vector embedding for a prompt
Description
Get vector embedding for a prompt
Usage
embeddings(model, prompt, normalize = TRUE, endpoint = "/api/embeddings")
Arguments
model |
A character string of the model name such as "llama3". |
prompt |
A character string of the prompt that you want to get the vector embedding for. |
normalize |
Normalize the vector to length 1. Default is TRUE. |
endpoint |
The endpoint to get the vector embedding. Default is "/api/embeddings". |
Value
A numeric vector of the embedding.
Examples
embeddings("nomic-embed-text:latest", "The quick brown fox jumps over the lazy dog.")
[Package ollamar version 1.1.1 Index]