Get Mistral API key from R environment variable.
Source:R/api_key_functions.R
get_api_key_mistral.RdGet Mistral API key from R environment variable.
Arguments
- env_var
Character string indicating the name of the temporary R environment variable with the API key and the used AI model. Currently, the argument only takes
env_var = "MISTRAL_API_KEY". Seeset_api_key()to set/create this variable.
Details
get_api_key_mistral() can be used after executing set_api_key() or by adding the
api key permanently to your R environment by using usethis::edit_r_environ().
Then write MISTRAL_API_KEY=[insert your api key here] and close the .Renviron window and restart R.
Note
Find your personal API key via the Mistral quickstart guide at https://docs.mistral.ai/getting-started/quickstarts/studio/activate-and-generate-api-key.