login {askgpt}R Documentation

Log in to OpenAI

Description

Log in to OpenAI

Usage

login(api_key, force_refresh = FALSE, cache_dir = NULL, no_cache = FALSE)

Arguments

api_key

API key to use for authentication. If not provided, the function look for a cached key or guide the user to obtain one.

force_refresh

Log in again even if an API key is already cached.

cache_dir

dir location to save keys on disk. The default is to use rappdirs::user_cache_dir("askgpt").

no_cache

Don't cache the API key, only load it into the environment.

Value

a character vector with an API key


[Package askgpt version 0.1.3 Index]