Sometimes you’ll see environment variables used in BAML, like in clients:
Once you open a .baml
file in VSCode, you should see a small button over every BAML function: Open Playground
. Then you should be able to set environment variables in the settings tab.
Or type BAML Playground
in the VSCode Command Bar (CMD + Shift + P
or CTRL + Shift + P
) to open the playground.
To send logs and traces to Boundary Studio, you need to set the BOUNDARY_API_KEY
environment variable. This key is provided when you create an API key in your Boundary Studio dashboard.
BAML will do its best to load environment variables from your program. Any of the following strategies for setting env vars are compatible with BAML:
Dockerfile
next.config.js
secrets-store.csi.k8s.io
.env
file (using dotenv
CLI)python-dotenv
package in Python or dotenv
package in Node.jsWhen you use BAML in your application, logs and traces are automatically sent to Boundary Studio for monitoring and debugging. To enable this integration, you need to set the BOUNDARY_API_KEY
environment variable with an API key from your Boundary Studio dashboard.
The API key is used to:
Once you open a .baml
file in VSCode, you should see a small button over every BAML function: Open Playground
. Then you should be able to set environment variables in the settings tab.
Or type BAML Playground
in the VSCode Command Bar (CMD + Shift + P
or CTRL + Shift + P
) to open the playground.
To send logs and traces to Boundary Studio, you need to set the BOUNDARY_API_KEY
environment variable. This key is provided when you create an API key in your Boundary Studio dashboard.
BAML will do its best to load environment variables from your program. Any of the following strategies for setting env vars are compatible with BAML:
Dockerfile
next.config.js
secrets-store.csi.k8s.io
.env
file (using dotenv
CLI)python-dotenv
package in Python or dotenv
package in Node.jsYou can set the API key for an LLM dynamically by passing in the key as a header or as a parameter (depending on the provider), using the ClientRegistry.