@jaypie/llm 1.3.18 → 1.3.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +8 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +8 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -10653,7 +10653,14 @@ const getLogger$3 = () => log$2.lib({ lib: JAYPIE.LIB.LLM });
|
|
|
10653
10653
|
// Client initialization
|
|
10654
10654
|
async function initializeClient$3({ apiKey, } = {}) {
|
|
10655
10655
|
const logger = getLogger$3();
|
|
10656
|
-
|
|
10656
|
+
let resolvedApiKey = apiKey || (await getEnvSecret("GOOGLE_API_KEY"));
|
|
10657
|
+
if (!resolvedApiKey) {
|
|
10658
|
+
const geminiApiKey = await getEnvSecret("GEMINI_API_KEY");
|
|
10659
|
+
if (geminiApiKey) {
|
|
10660
|
+
logger.warn("GEMINI_API_KEY is a deprecated fallback; set GOOGLE_API_KEY instead");
|
|
10661
|
+
resolvedApiKey = geminiApiKey;
|
|
10662
|
+
}
|
|
10663
|
+
}
|
|
10657
10664
|
if (!resolvedApiKey) {
|
|
10658
10665
|
throw new ConfigurationError("The application could not resolve the requested keys");
|
|
10659
10666
|
}
|