langchain icon indicating copy to clipboard operation
langchain copied to clipboard

Make api keys optional when running tests.

Open matthusby opened this issue 1 year ago • 2 comments

When running the test without having all the API keys set this would blow up even if you are not testing that api. This will just try to load them and continue.

matthusby avatar Aug 25 '24 17:08 matthusby

Hi @matthusby! I see where you're coming from with this. At the same time, having it error loudly has helped me when I moved development to another machine and the ENV wasn't all the way setup yet.

I'll think a bit more about this.

brainlid avatar Sep 06 '24 03:09 brainlid

Yeah I can see that being useful. I was coming at this from the default should just work, but if you are testing those api's then this does in fact break the just work part.

How do you feel about logging a notice if the key could not be found?

matthusby avatar Sep 06 '24 13:09 matthusby

I'm not going to go in this direction at this time. Thanks for the thoughtful contribution!

brainlid avatar Jan 22 '25 19:01 brainlid