UNPKG

@masuidrive/bloom-local-rag

Version:

RAG (Retrieval-Augmented Generation) system for local directories - Index and search your documents with AI-powered answers

21 lines 654 B
import { ChatGoogleGenerativeAI } from '@langchain/google-genai'; import { ChatOpenAI } from '@langchain/openai'; import { getApiKey } from './config.js'; export function createLLM(config) { const apiKey = getApiKey(config.llm.provider); if (config.llm.provider === 'gemini') { return new ChatGoogleGenerativeAI({ apiKey, model: config.llm.model, temperature: config.llm.temperature, }); } else { return new ChatOpenAI({ apiKey, model: config.llm.model, temperature: config.llm.temperature, }); } } //# sourceMappingURL=llm.js.map