Skip to content

Using LLMs get answers from PDFs with Langchain and Javascript

License

Notifications You must be signed in to change notification settings

muzafferkadir/js-langchain

Repository files navigation

Using langchain library with basics in js. (splitting pdf files, creating chunks, converting vectors, using conversational chain in memory)

Usage

Install dependencies.
npm install
Configure enviroments.
  • Create .env document inside root of project (or change name of .env.sample to .env)
  • Add your OpenAI API Key into .env (as OPENAI_API_KEY=<your api key>)
Run project
npm run start
Enter your question to console
Question: what is the document about?

Alt text

Adding Documents

You can add your pdf files to /documents folder inside of root of folder. bitcoin.pdf is already included.

About

Using LLMs get answers from PDFs with Langchain and Javascript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published