pdftochat icon indicating copy to clipboard operation
pdftochat copied to clipboard

Add Upstash RAG Chat

Open ogzhanolguncu opened this issue 1 year ago • 1 comments

This PR, from the Upstash DX team, aims to greatly simplify the pdftochat code. It proposes making the codebase easier by using Upstash's Vector store for embedding conversion. The Upstash RAG Chat SDK helps eliminate clutter and confusing sections.

Key updates:

  • Upgrades Next.js version
  • Integrates Upstash RAG Chat and Upstash Vector
  • Removes redundant code

Edit: I upgraded the Next.js to 14 to resolve some issues that were causing failures. Keeping the codebase up to date is important, so most of the changes in the diff are due to the updated lock file. Additionally, we are open to partnerships if you're interested. pdftochat can use Upstash's Vector for embeddings, Redis for history, and Qstash LLM.

Thanks to this PR, we can now easily add analytics tools like Helicone and LangSmith and easily swap between different providers like openai, togetherai, mistralai. For instance:

const ragChat = new RAGChat({
  model: openai("gpt-3.5-turbo", {
    apiKey: process.env.OPENAI_API_KEY,
    analytics: { name: "helicone", token: process.env.HELICONE_API_KEY },
  }),
});

ogzhanolguncu avatar Aug 21 '24 13:08 ogzhanolguncu

@ogzhanolguncu is attempting to deploy a commit to the Hassanteam Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Aug 21 '24 13:08 vercel[bot]