embed_bedrock {ragnar} | R Documentation |
Embed text using a Bedrock model
Description
Embed text using a Bedrock model
Usage
embed_bedrock(x, model, profile, api_args = list())
Arguments
x |
x can be:
|
model |
Currently only Cohere.ai and Amazon Titan models are supported. There are no guardarails for the kind of model that is used, but the model must be available in the AWS region specified by the profile. You may look for available models in the Bedrock Model Catalog |
profile |
AWS profile to use. |
api_args |
Additional arguments to pass to the Bedrock API. Depending
on the |
Value
If x
is missing returns a function that can be called to get embeddings.
If x
is not missing, a matrix of embeddings with 1 row per input string, or a dataframe with an 'embedding' column.