eval: Add support for reading from a .env file (#29426)

This PR adds support for the eval to read environment variables from a
`.env` file located in the `crates/eval` directory.

For instance, you can use it to set your Anthropic API key:

```
ANTHROPIC_API_KEY=<secret>
```

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-04-25 11:53:02 -04:00 committed by GitHub
parent 4f9cadabf7
commit a5405fcbd7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 18 additions and 1 deletions

View file

@ -437,6 +437,7 @@ dashmap = "6.0"
dap-types = { git = "https://github.com/zed-industries/dap-types", rev = "be69a016ba710191b9fdded28c8b042af4b617f7" }
derive_more = "0.99.17"
dirs = "4.0"
dotenv = "0.15.0"
ec4rs = "1.1"
emojis = "0.6.1"
env_logger = "0.11"