View source: R/service-openai_api_calls.R
| request_base | R Documentation | 
This function sends a request to a specific OpenAI API task endpoint at
the base URL https://api.openai.com/v1, and authenticates with
an API key using a Bearer token.
request_base(task, token = Sys.getenv("OPENAI_API_KEY"))
task | 
 character string specifying an OpenAI API endpoint task  | 
token | 
 String containing an OpenAI API key. Defaults to the OPENAI_API_KEY environmental variable if not specified.  | 
An httr2 request object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.