langchain-chatbot-demo icon indicating copy to clipboard operation
langchain-chatbot-demo copied to clipboard

Demo App is broken due to old langchain deps, and openai deprecations

Open VeVarunSharma opened this issue 1 year ago • 0 comments

Bug report

Describe the bug

There's a couple issues related to the main chat functionality, and actually storing the embeddings into supabase due to old packages where some methods have changed from langchain.

sub-Issue 1 - Chat functionality broken due to outdated packages

When trying to run this demo app, the chat function is broken because it attempts to use the gpt-3.5-turbo model, but the underlying langchain openai pacakges is stuck at a 404 for each request because it's using a text-davinci-003 model (incorrect) as the underlying langchain packages is quite outdated. The imports would need to be changed to the new packages as well.

sub-Issue 2 - Storing the Embeddings into supabase also broken due to outdated packages

Furthermore, beyond the main chat issue, when you run the crawl.ts, or via the API endpoint to crawl, tokenize, and store embeddings into supabase, it's broken due to a change over of packages from

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

Sub-issue 1

  1. Run npm run dev
  2. attempt to chat with the ai
  3. error 404 occurs given the wrong will be used due to old langchain integration

Sub-issue 2

  1. run npm run dev
  2. use any example URL to attempt to crawl and store embeddings into supabase
  3. the process will fail

Expected behavior

When chatting with the AI it should allow the user to ask it questions and have responses returned back. When trying to store embeddings as it's used for chatting with the A.I it should store into supabase via the crawl feature.

Screenshots

If applicable, add screenshots to help explain your problem. image

System information

  • OS: [e.g. macOS, Windows]
  • Browser (if applies) [e.g. chrome, safari] ==> issue persists regardless of browser version or OS
  • Version of supabase-js: 1.142.2
  • Version of Node.js: v21.5.0

Additional context

Add any other context about the problem here.

The old langchain version is: langchain": "^0.0.96", but we should be using ==> ^0.1.20

Missing packages: "@langchain/community": "^0.0.30", "@langchain/core": "^0.1.30", "@langchain/openai": "^0.0.14",

VeVarunSharma avatar Feb 20 '24 01:02 VeVarunSharma