Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

💬 Chat with the LangChain JS/TS documentation, with sources. 💬

License

NotificationsYou must be signed in to change notification settings

langchain-ai/chat-langchainjs

Repository files navigation

This repo is an implementation of a locally hosted chatbot specifically focused on question answering over theLangChain documentation.Built withLangChain, andNext.js.

Deployed version:chatjs.langchain.com

Looking for the Python version? Clickhere

✅ Local development

  1. Install dependencies via:yarn install.
  2. Set the required environment variables listed insidebackend/.env.example for the backend, andfrontend/.env.example for the frontend.

Ingest

  1. Build the backend viayarn build --filter=backend (from root).
  2. Run the ingestion script by navigating into./backend and runningyarn ingest.

Frontend

  1. Navigate into./frontend and runyarn dev to start the frontend.
  2. Openlocalhost:3000 in your browser.

📚 Technical description

There are two components: ingestion and question-answering.

Ingestion has the following steps:

  1. Pull html from documentation site as well as the Github Codebase
  2. Load html with LangChain'sRecursiveUrlLoader andSitemapLoader
  3. Split documents with LangChain'sRecursiveCharacterTextSplitter
  4. Create a vectorstore of embeddings, using LangChain'sWeaviate vectorstore wrapper (with OpenAI's embeddings).

Question-Answering has the following steps:

  1. Given the chat history and new user input, determine what a standalone question would be using GPT-3.5.
  2. Given that standalone question, look up relevant documents from the vectorstore.
  3. Pass the standalone question and relevant documents to the model to generate and stream the final answer.
  4. Generate a trace URL for the current chat session, as well as the endpoint to collect feedback.

Documentation

Looking to use or modify this Use Case Accelerant for your own needs? We've added a few docs to aid with this:

  • Concepts: A conceptual overview of the different components of Chat LangChain. Goes over features like ingestion, vector stores, query analysis, etc.
  • Modify: A guide on how to modify Chat LangChain for your own needs. Covers the frontend, backend and everything in between.
  • Running Locally: The steps to take to run Chat LangChain 100% locally.
  • LangSmith: A guide on adding robustness to your application using LangSmith. Covers observability, evaluations, and feedback.
  • Production: Documentation on preparing your application for production usage. Explains different security considerations, and more.
  • Deployment: How to deploy your application to production. Covers setting up production databases, deploying the frontend, and more.

About

💬 Chat with the LangChain JS/TS documentation, with sources. 💬

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors4

  •  
  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp