UNPKG

gaunt-sloth-assistant

Version:

[![Tests and Lint](https://github.com/Galvanized-Pukeko/gaunt-sloth-assistant/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/Galvanized-Pukeko/gaunt-sloth-assistant/actions/workflows/unit-tests.yml) [![Integration Tests](https://github.co

25 lines 991 B
import { displayWarning } from '#src/utils/consoleUtils.js'; import { writeFileIfNotExistsWithMessages } from '#src/utils/fileUtils.js'; const jsonContent = `{ "llm": { "type": "vertexai", "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('For Google VertexAI you likely to need to do `gcloud auth login` and `gcloud auth application-default login`.'); } // Function to process JSON config and create VertexAI LLM instance export async function processJsonConfig(llmConfig) { const vertexAi = await import('@langchain/google-vertexai'); return new vertexAi.ChatVertexAI({ ...llmConfig, model: llmConfig.model || 'gemini-2.5-pro', }); } //# sourceMappingURL=vertexai.js.map