Environment Variables
To call your LLM from a third-party service, you’ll likely need some environment variables to keep your API keys safe.
Since Evalite is based on Vitest, it should already pick them up from your vite.config.ts
.
Setting Up Env Variables
If you don’t have Vitest set up, here’s how to do it:
-
Create a
.env
file in the root of your project: -
Add
.env
to your.gitignore
, if it’s not already there -
Install
dotenv
: -
Add a
vite.config.ts
file:
Now, your environment variables will be available in your evals.