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

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

export const ragChat = new RAGChat({
  model: openai("gpt-4-turbo"),
});

And set your OpenAI API key as an environment variable:

OPENAI_API_KEY=...