You can use TogetherAI as LLM provider in RAGChat. To use an TogetherAI model, first initialize RAGChat with the TogetherAI model:

import { RAGChat, togetherai } from "@upstash/rag-chat";

export const ragChat = new RAGChat({
  model: togetherai("meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo",{apiKey: "TOGETHER_AI_KEY"}),
});