| embed_azure_openai | R Documentation |
Uses Azure AI Foundry to create embeddings
embed_azure_openai(
x,
endpoint = get_envvar("AZURE_OPENAI_ENDPOINT"),
api_key = get_envvar("AZURE_OPENAI_API_KEY"),
api_version = "2023-05-15",
model,
batch_size = 20L,
api_args = list()
)
x |
x can be:
|
endpoint |
The Azure AI Foundry endpoint URL. A URI in the form of
|
api_key |
resolved using env var |
api_version |
The API version to use. Defaults to |
model |
The deployment name of the model to use for generating embeddings. |
batch_size |
split |
api_args |
A list of additional arguments to pass to the API request body. |
If x is a character vector, then a numeric matrix is returned,
where nrow = length(x) and ncol = <model-embedding-size>. If x is a
data.frame, then a new embedding matrix "column" is added, containing the
matrix described in the previous sentence.
A matrix of embeddings with 1 row per input string, or a dataframe with an 'embedding' column.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.