run-llama / llama_deploy

Deploy your agentic worfklows to production
https://docs.llamaindex.ai/en/stable/module_guides/llama_deploy/
MIT License
1.86k stars 193 forks source link

Add environment variables to deployment definition #321

Open masci opened 1 month ago

masci commented 1 month ago

At the moment the only way to pass env vars to a running instance of Llama Deploy is through setting them before starting the process, which is not practical in case of a remote installation or docker containers.

We should add the option to declare the environment variables needed by each service like this:

services:
  test-workflow:
    name: Test Workflow
    env:
        OPENAI_API_KEY: "secret!"
    source:
      type: git
      name: https://github.com/run-llama/llama_deploy.git
    path: tests/apiserver/data/workflow:my_workflow

then the Control plane would propagate the env var when spinning up the service.