UNPKG

ragvault

Version:

Securely manage and query your private data using a local vector database. Your private RAG.

28 lines (27 loc) 804 B
import { ChatFireworks } from "@langchain/community/chat_models/fireworks"; import Anthropic from "@anthropic-ai/sdk"; import OpenAI from "openai"; export const GetFireworksInstance = (apiKey) => { try { const llm = new ChatFireworks({ model: "accounts/fireworks/models/llama-v3p1-70b-instruct", temperature: 0.2, apiKey: apiKey, }); return llm; } catch (error) { console.log(error); return null; } }; export const GetClaudeInstance = (apiKey) => { const anthropic = new Anthropic({ apiKey: apiKey, // defaults to process.env["ANTHROPIC_API_KEY"] }); return anthropic; }; export const GetOpenAIInstance = (apiKey) => { const openai = new OpenAI({ apiKey: apiKey }); return openai; };