GithubHelp home page GithubHelp logo

chansonpro / langchain4j-aideepin-web Goto Github PK

View Code? Open in Web Editor NEW

This project forked from moyangzhan/langchain4j-aideepin-web

0.0 0.0 0.0 3.11 MB

License: MIT License

Shell 0.10% JavaScript 0.27% TypeScript 22.06% CSS 0.02% HTML 0.51% Batchfile 0.05% Vue 67.71% Dockerfile 0.07% Less 9.20%

langchain4j-aideepin-web's Introduction

AIDeepIn Web

LangChain4j-AIDeepin 基于 ChatGPT 等大语言模型与 Langchain4j 等应用框架实现,开源、可离线部署的检索增强生成(RAG)大模型知识库项目。

该项目如对您有帮助,欢迎点赞

介绍

此仓库为langchain4j-aideepin的前端项目,后端服务代码见langchain4j-aideepin

本仓库代码由chatgpt-web前端工程改造而来

功能点

  • 注册&登录
  • 多会话(多角色)
  • 图片生成(文生图、修图、图生图)
  • 提示词
  • 额度控制
  • 基于大模型的知识库(RAG)
  • 多模型随意切换

接入的模型:

  • ChatGPT 3.5
  • 通义千问
  • 文心一言
  • DALL-E 2

前置要求

Node

node 需要 ^16 || ^18 || ^19 版本(node >= 14 需要安装 fetch polyfill),使用 nvm 可管理本地多个 node 版本

node -v

PNPM

如果你没有安装过 pnpm

npm install pnpm -g

安装依赖。

根目录下运行以下命令

pnpm bootstrap

环境变量

全部参数变量请查看或这里

/service/.env.example

测试环境运行

根目录下运行以下命令

pnpm dev

打包

使用 Docker

Docker build & Run

docker build -t aideepin-web .

# 前台运行
docker run --name aideepin-web --rm -it -p 127.0.0.1:1002:1002 aideepin-web

# 后台运行
docker run --name aideepin-web -d -p 127.0.0.1:1002:1002 aideepin-web

# 运行地址
http://localhost:1002/

手动打包

前端网页

1、修改根目录下 .env 文件中的 VITE_GLOB_API_URL 为你的实际后端口地址

2、根目录下运行以下命令,然后将 dist 文件夹内的文件复制到你网站服务的根目录下

参考信息

pnpm build

常见问题

Q: 为什么 Git 提交总是报错?

A: 因为有提交信息验证,请遵循 Commit 指南

Q: 如果只使用前端页面,在哪里改请求接口?

A: 根目录下 .env 文件中的 VITE_GLOB_API_URL 字段。

Q: 文件保存时全部爆红?

A: vscode 请安装项目推荐插件,或手动安装 Eslint 插件。

Q: 前端没有打字机效果?

A: 一种可能原因是经过 Nginx 反向代理,开启了 buffer,则 Nginx 会尝试从后端缓冲一定大小的数据再发送给浏览器。请尝试在反代参数后添加 proxy_buffering off;,然后重载 Nginx。其他 web server 配置同理。

License

MIT

截图

1691585544443

AI聊天: 1691583184761

AI绘图: 1691583124744

知识库: 1691583329105 1691583329105 1691583329105 1691583329105

token统计: 1691583329105

langchain4j-aideepin-web's People

Contributors

moyangzhan avatar

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.