Skip to content

Commit

Permalink
Updates for re-pub (langchain-ai#269)
Browse files Browse the repository at this point in the history
* Updates for re-pub

* rm js backend

* cr
  • Loading branch information
bracesproul authored Feb 13, 2024
1 parent bbe56e9 commit 8bb5135
Show file tree
Hide file tree
Showing 10 changed files with 6,516 additions and 6,192 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,11 @@ bin/
pyvenv.cfg
node_modules/
.envrc

.yarn/*
.yarn/install-state.gz
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# 🦜️🔗 Chat LangChain

This repo is an implementation of a locally hosted chatbot specifically focused on question answering over the [LangChain documentation](https://langchain.readthedocs.io/en/latest/).
Built with [LangChain](https://github.com/hwchase17/langchain/), [FastAPI](https://fastapi.tiangolo.com/), and [Next.js](https://nextjs.org).
This repo is an implementation of a locally hosted chatbot specifically focused on question answering over the [LangChain documentation](https://python.langchain.com/).
Built with [LangChain](https://github.com/langchain-ai/langchain/), [FastAPI](https://fastapi.tiangolo.com/), and [Next.js](https://nextjs.org).

Deployed version: [chat.langchain.com](https://chat.langchain.com)

> Looking for the JS version? Click [here](https://github.com/langchain-ai/chat-langchainjs).
The app leverages LangChain's streaming support and async API to update the page in real time for multiple users.

## ✅ Running locally
Expand All @@ -29,13 +31,6 @@ export LANGCHAIN_PROJECT=
1. Run the frontend with `yarn dev` for frontend.
1. Open [localhost:3000](http://localhost:3000) in your browser.

## ☕ Running locally (JS backend)
1. Follow the first three steps above to ingest LangChain docs data into the vectorstore.
1. Install frontend dependencies by running `cd chat-langchain`, then `yarn`.
1. Populate a `chat-langchain/.env.local` file with your own versions of keys from the `chat-langchain/.env.example` file, and set `NEXT_PUBLIC_API_BASE_URL` to `"http://localhost:3000/api"`.
1. Run the app with `yarn dev`.
1. Open [localhost:3000](http://localhost:3000) in your browser.

## 📚 Technical description

There are two components: ingestion and question-answering.
Expand Down
1 change: 1 addition & 0 deletions chat-langchain/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
236 changes: 0 additions & 236 deletions chat-langchain/app/api/chat/stream_log/route.ts

This file was deleted.

55 changes: 0 additions & 55 deletions chat-langchain/app/api/feedback/route.ts

This file was deleted.

47 changes: 0 additions & 47 deletions chat-langchain/app/api/get_trace/route.ts

This file was deleted.

2 changes: 1 addition & 1 deletion chat-langchain/app/components/ChatWindow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import React, { useEffect, useRef, useState } from "react";
import { useSearchParams } from "next/navigation";
import { RemoteRunnable } from "langchain/runnables/remote";
import { RemoteRunnable } from "@langchain/core/runnables/remote";
import { applyPatch } from "@langchain/core/utils/json_patch";

import { EmptyState } from "../components/EmptyState";
Expand Down
Loading

0 comments on commit 8bb5135

Please sign in to comment.