Git Product home page Git Product logo

chat-langchainjs's People

Contributors

conroywhitney avatar dqbd avatar hwchase17 avatar nfcampos avatar sullivan-sean avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

chat-langchainjs's Issues

Any plans to update this repo?

@sullivan-sean @hwchase17

This was built w/ "langchain": "0.0.15", and we're now at Release 0.0.124

Any plans to update this repo to a newer release as quite a few things have changed with the langchain library at this point. Really appreciate your effort on this as it's a great reference and learning tool.

The latest changes/commits broke everything

I installed everything as instructed on february 17 and it worked. I removed the entire project from my VPS and reinstalled again with the latest commits and now it's completely broken.

event - compiled client and server successfully in 236 ms (166 modules)
Warning: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:

  1. You might have mismatching versions of React and the renderer (such as React DOM)
  2. You might be breaking the Rules of Hooks
  3. You might have more than one copy of React in the same app
    See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
    TypeError: Cannot read properties of null (reading 'useContext')
    at Object.useContext (/root/out/SecGPT/chat-langchainjs/node_modules/react/cjs/react.development.js:1618:21)
    at Head (webpack-internal:///../../../../usr/local/lib/node_modules/next/dist/shared/lib/head.js:136:34)
    at renderWithHooks (/usr/local/lib/node_modules/next/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5658:16)
    at renderIndeterminateComponent (/usr/local/lib/node_modules/next/node_modules/react-dom/cjs/react-dom-server.browser.development.js:5731:15)

and it goes on forever

"Getting Started Documentation" URL Broken

Hey @sullivan-sean! This is an insanely helpful starting point for langchainjs. Thank you for putting this together!

I was testing out chat-langchainjs and put in this question:

Does langchain support typescript?

I got back:

Yes, LangChain supports TypeScript. You can find more information on how to use TypeScript with LangChain in the Getting Started Documentation.

langchainjs-getting-started-error

Unfortunately that link goes to https://langchain.readthedocs.io/en/latest/getting_started/ which 404's; it really should go to https://langchain.readthedocs.io/en/latest/getting_started/getting_started.html

Looking at data/docstore.json, all the links I can for "Getting Started" have the correct URL: https://langchain.readthedocs.io/en/latest/getting_started/getting_started.html

getting-started-correct-urls

What do you think is going on here? Which project/repo do you think would own the underlying issue?

"text-davinci-003" will be deprecated by Jan 4, 2024

Update application to use gpt-3.5-turbo-instruct model and clarify API endpoint changes

Description

The text-davinci-003 model is scheduled for deprecation on Jan 04, 2024, according to the OpenAI Deprecations documentation. This issue aims to address the need to update the application to utilize the "gpt-3.5-turbo-instruct" model as a replacement.

Furthermore, it is unclear whether the update to the new model requires any changes to the API endpoints. The current implementation relies on the "completions" endpoint, and I am ensure if modifications are needed to ensure the smooth transition to the new model.

hnswlib-node installation fails

When yarn is run, hnswlib-node throws an error as below.

It appears the package is looking for a Visual Studio installation to use via node-gyp. I also tested installation of older versions and the same error occured.

Error:

Exit code: 1
Command: node-gyp rebuild
[...]
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info find Python using Python version 3.10.10 found at [..]
gyp ERR! find VS
gyp ERR! find VS msvs_version not set from command line or npm config  
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Promptgyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details        
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.gyp ERR! find VS For more information consult the documentation at:    
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to 
use
gyp ERR! stack     at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:122:47)gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:75:16
gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:363:14)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:71:14
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:384:16
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack     at ChildProcess.exithandler (node:child_process:408:5)
gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
gyp ERR! stack     at maybeClose (node:internal/child_process:1093:16) 
gyp ERR! System Windows_NT 10.0.19044
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd 
gyp ERR! node -v v16.17.0
gyp ERR! node-gyp -v v9.0.0
gyp ERR! not ok
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about 
this command.

"ReferenceError: Headers is not defined" during "yarn ingest"

Hey -- thanks again for your work on this project. I'm so stoked it exists ๐Ÿ˜

I ran into an error while running yarn ingest on a new clone. It seems to be due to a change in langchainjs earlier today.

I posted an issue over there and will update here when I hear back: langchain-ai/langchainjs#159

In the meantime, I was able to roll back to "langchain": "0.0.12" version and yarn ingest worked.

python3 ingest.py: ModuleNotFoundError: No module named 'unstructured'

Hi there!

Trying to get this running locally and keep hitting:

 python3 ingest.py
Traceback (most recent call last):
  File "/Users/peter/Projects/langchain-projects/chat-langchainjs/ingest/ingest.py", line 3, in <module>
    from langchain.document_loaders import ReadTheDocsLoader
  File "/opt/homebrew/lib/python3.11/site-packages/langchain/document_loaders/__init__.py", line 22, in <module>
    from langchain.document_loaders.powerpoint import UnstructuredPowerPointLoader
  File "/opt/homebrew/lib/python3.11/site-packages/langchain/document_loaders/powerpoint.py", line 5, in <module>
    from unstructured.__version__ import __version__ as __unstructured_version__
ModuleNotFoundError: No module named 'unstructured'

python3 installed via homebrew
pip3 install -r requirements.txt

Am I forgetting to do something? Thank you!

api/chat.ts vs api/chat-stream.ts

Hello! Thanks for all the work! It was so easy to get it up and working!
I was wondering what's the difference between chat.ts and chat-stream.ts? I don't see chat-stream being used anywhere, but the bot's responses seem to come as a stream.

Thanks!

How do you configure the specific OpenAI model the app uses?

Title says it all.
I see a lot of references to text-davinci-002 in the generated docstore.json file so it appears this is the model being used but I don't see any references to that model in the repo.
If I'd like to use a different model, how would I set that up?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.