Skip to content

Commit

Permalink
Merge pull request #81 from guangzhengli/langchain
Browse files Browse the repository at this point in the history
Use Langchain to refactor all project.
  • Loading branch information
guangzhengli authored Jun 14, 2023
2 parents edad8d9 + a94288f commit 918ec48
Show file tree
Hide file tree
Showing 104 changed files with 5,517 additions and 1,617 deletions.
File renamed without changes.
File renamed without changes.
44 changes: 43 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,46 @@
.idea
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/
/dist

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
.idea

public/uploads/*

.env

/tmp

docker-compose-local.yml
File renamed without changes.
25 changes: 2 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
[![My Skills](https://skillicons.dev/icons?i=nextjs,tailwind,react,python,flask)](https://skillicons.dev)<a href="https://www.buymeacoffee.com/iguangzhengli" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>

> ⚠️⚠️⚠️ Warning: Please understand that the https://chatfiles-ui.fly.dev web demo is temporarily unavailable as used up all the credits available in my free trial. and I am unable to recharge. If necessary, please run it locally yourself. Thanks.
# ChatFiles

EN | [中文文档](README.zh.md)

> this repository use [jerryjliu/llama_index](https://github.com/jerryjliu/llama_index), based on [mckaywrigley/chatbot-ui](https://github.com/mckaywrigley/chatbot-ui), inspired by [madawei2699/myGPTReader](https://github.com/madawei2699/myGPTReader)
> this repository use [hwchase17/langchainjs](https://github.com/hwchase17/langchainjs), based on [mckaywrigley/chatbot-ui](https://github.com/mckaywrigley/chatbot-ui)
![Chatfiles](./doc/chatfiles.png)

Expand All @@ -15,8 +13,6 @@ EN | [中文文档](README.zh.md)

## How to use it

Open https://chatfiles-ui.fly.dev and chat with [Good Example](./doc/Example.md)

### How to run locally without limited
1. clone this repository.
2. create a .env file on root path.
Expand All @@ -40,28 +36,11 @@ open browser with http://localhost:3000
### chatfiles-ui

```shell
cd chatfiles-ui
npm install
npm run dev
```

### chatfiles
```shell
cd chatfiles
```

create a file named .env with value(OPENAI_API_KEY=your token)

```shell
python3 server.py
```

### how to deploy flyio
- [Deploy to fly.io](./doc/deploy-flyio.md)


## Feature

- [x] Chat with GPT-3.5
- [x] Chat with file by llama_index
- [x] Upload multiple files to one index, chat with multiple files.
- [x] Chat with file by langchainjs
21 changes: 1 addition & 20 deletions README.zh.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
[![My Skills](https://skillicons.dev/icons?i=nextjs,tailwind,react,python,flask)](https://skillicons.dev)<a href="https://www.buymeacoffee.com/iguangzhengli" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>

> ⚠️⚠️⚠️警告:由于我的 Openai key 额度已用完,并且我无法充值,网页 demo 暂时无法服务。如果有需要,请自行在本地运行。感谢。
# ChatFiles
**上传文件然后与之对话.**

## 如何使用

浏览器打开:https://chatfiles-ui.fly.dev
上传文件对话,可以看看这些好的例子: [Good Example](./doc/Example.md)

### 如何无限制的本地运行
Expand All @@ -30,28 +26,13 @@ docker compose up
直接发送消息,而无需上传文件。

## 如何本地运行
### chatfiles-ui
### chatfiles

```shell
cd chatfiles-ui
npm install
npm run dev
```

### chatfiles
```shell
cd chatfiles
```

创建一个名为 .env的文件,里面设置值为(OPENAI_API_KEY=your token)

```shell
python3 server.py
```

## 如何部署到 fly.io
- [Deploy to fly.io](./doc/deploy-flyio.md)

## 功能

- [x] 与 GPT-3.5 对话。
Expand Down
38 changes: 0 additions & 38 deletions chatfiles-ui/.gitignore

This file was deleted.

21 changes: 0 additions & 21 deletions chatfiles-ui/LICENSE

This file was deleted.

1 change: 0 additions & 1 deletion chatfiles-ui/README.md

This file was deleted.

69 changes: 0 additions & 69 deletions chatfiles-ui/components/Sidebar/Key.tsx

This file was deleted.

58 changes: 0 additions & 58 deletions chatfiles-ui/pages/api/chat.ts

This file was deleted.

57 changes: 0 additions & 57 deletions chatfiles-ui/pages/api/models.ts

This file was deleted.

Loading

1 comment on commit 918ec48

@vercel
Copy link

@vercel vercel bot commented on 918ec48 Jun 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.