Adding GOOGLE_GENERATIVE_AI_API_KEY not working

Hi,

I have created .env.local by copying from .env.local and specified GOOGLE_GENERATIVE_AI_API_KEY at line 26.

But when running via pnpm or via docker, it shows Google API Key as not set. However, in case of pnpm run dev, it seems it’s still picking up an API key, but not for docker.

image

Hi @askar ,
I have raised the same issue, link’s here

  1. You can give a try by setting up the env varibale GOOGLE_GENERATIVE_AI_API_KEY in the running container.
1 Like

The message may be a bit misleading, is it possible that you manually entered the key locally but not on the docker version of the app? As long as the key is included in .env.local, this should propagate to the docker container on build. I just grabbed a key (glad they are providing those), and was able to use 1.5 Flash successfully.

If that is the issue, the wording could probably use some work later on. If not, I’ve bookmarked the topic.

This, this api string placement location is only if you haven’t already saved it locally. I used VScode to edit the .env.local, and have all my local LLMs running off an external M.2

I have a fix, I will add it to PR today

2 Likes