Use this function to generate text completions using OpenAI's API.
create_completion_azure_openai(
prompt,
task = Sys.getenv("AZURE_OPENAI_TASK"),
base_url = Sys.getenv("AZURE_OPENAI_ENDPOINT"),
deployment_name = Sys.getenv("AZURE_OPENAI_DEPLOYMENT_NAME"),
token = Sys.getenv("AZURE_OPENAI_KEY"),
api_version = Sys.getenv("AZURE_OPENAI_API_VERSION")
)
a list with the generated completions and other information returned by the API
a list to use as the prompt for generating completions
a character string for the API task (e.g. "completions"). Defaults to the Azure OpenAI task from environment variables if not specified.
a character string for the base url. It defaults to the Azure OpenAI endpoint from environment variables if not specified.
a character string for the deployment name. It will default to the Azure OpenAI deployment name from environment variables if not specified.
a character string for the API key. It will default to the Azure OpenAI API key from your environment variables if not specified.
a character string for the API version. It will default to the Azure OpenAI API version from your environment variables if not specified.