View source: R/create_embedding.R
| create_embedding | R Documentation | 
Creates an embedding vector that represents the provided input. See this page for details.
create_embedding(
  engine_id = deprecated(),
  model,
  input,
  user = NULL,
  openai_api_key = Sys.getenv("OPENAI_API_KEY"),
  openai_organization = NULL
)
| engine_id | |
| model | required; a length one character vector. | 
| input | required; an arbitrary length character vector. | 
| user | optional; defaults to  | 
| openai_api_key | required; defaults to  | 
| openai_organization | optional; defaults to  | 
For arguments description please refer to the official documentation.
Returns a list, an element of which contains embedding vector(s) for a given input.
## Not run: 
create_embedding(
    model = "text-embedding-ada-002",
    input = c(
        "Ah, it is so boring to write documentation",
        "But examples are really crucial"
    )
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.