gaunt-sloth-assistant
Version:
[](https://github.com/Galvanized-Pukeko/gaunt-sloth-assistant/actions/workflows/unit-tests.yml) [ {
const gemini = await import('@langchain/google-genai');
// Use config value if available, otherwise use the environment variable
const googleApiKey = llmConfig.apiKey || env.GOOGLE_API_KEY;
return new gemini.ChatGoogleGenerativeAI({
...llmConfig,
apiKey: googleApiKey,
model: llmConfig.model || 'gemini-2.5-pro',
});
}
const jsonContent = `{
"llm": {
"type": "google-genai",
"model": "gemini-2.5-pro"
}
}`;
export function init(configFileName) {
// Determine which content to use based on file extension
if (!configFileName.endsWith('.json')) {
throw new Error('Only JSON config is supported.');
}
writeFileIfNotExistsWithMessages(configFileName, jsonContent);
displayWarning(`You need to update your ${configFileName} to add your Google GenAI API key, ` +
'or define GOOGLE_API_KEY environment variable.');
}
//# sourceMappingURL=google-genai.js.map