Skip to content

Latest commit

 

History

History
256 lines (190 loc) · 6.72 KB

README_en.md

File metadata and controls

256 lines (190 loc) · 6.72 KB

Getting Started

LangChain4j-AIDeepin is an AI-based productivity enhancement tool.

It can be used to assist enterprises/teams in technical research and development, product design, HR/finance/IT information consulting, system/product consulting, customer service support, etc.

🌟 If this project is helpful to you, please give it a star 🌟

System Composition and Documentation

中文文档 | English

AIDEEPIN

      |__ Server (langchain4j-aideepin)

      |__ User Web (langchain4j-aideepin-web)

      |__ Admin Web (langchain4j-aideepin-admin)

👉Detailed Documentation

Backend source repository: github or gitee

Frontend projects:

Demo URL

http://www.aideepin.com

Features

  • Registration & Login
  • Multi-session (multi-role)
  • Image generation (text-to-image, image editing, image-to-image)
  • Prompts
  • Quota control
  • Knowledge base based on large models (RAG)
    • Vector search
    • Graph search
  • Search based on large models (RAG)
  • Free switching between multiple models
  • Free switching between multiple search engines

Integrated Models:

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

Integrated Search Engines

Google

Bing (TODO)

Baidu (TODO)

Tech Stack

This repository is for the backend service

Tech stack:

Frontend tech stack:

  • vue3
  • vite
  • typescript
  • pnpm
  • pinia
  • naiveui

How to Deploy

Initialization

a. Initialize the database

  • Create the database aideepin

  • Execute docs/create.sql

  • Configure models (at least set one) or use the admin web to configure on the interface

    • Configure AI platforms
      -- OpenAI secretKey
      update adi_sys_config set value = '{"secret_key":"my_openai_secret_key"}' where name = 'openai_setting';
      
      -- Dashscope API key
      update adi_sys_config set value = '{"api_key":"my_dashcope_api_key"}' where name = 'dashscope_setting';
      
      -- Qianfan API key and secret key
      update adi_sys_config set value = '{"api_key":"my_qianfan_api_key","secret_key":"my_qianfan_secret_key"}' where name = 'qianfan_setting';
      
      -- Ollama configuration
      update adi_sys_config set value = '{"base_url":"my_ollama_base_url"}' where name = 'ollama_setting';
      
    • Enable AI platform models or add new models
      -- Enable model
      update adi_ai_model set is_enable = true where name = 'gpt-3.5-turbo';
      update adi_ai_model set is_enable = true where name = 'dall-e-2';
      update adi_ai_model set is_enable = true where name = 'qwen-turbo';
      update adi_ai_model set is_enable = true where name = 'ernie_speed';
      update adi_ai_model set is_enable = true where name = 'tinydolphin';
      
      -- Add new model
      INSERT INTO adi_ai_model (name, type, platform, is_enable) VALUES ('vicuna', 'text', 'ollama', true);
      
  • Fill in the search engine configuration

    • Google configuration
      update adi_sys_config set value = '{"url":"https://www.googleapis.com/customsearch/v1","key":"my key from cloud.google.com","cx":"my cx from programmablesearchengine.google.com"}' where name = 'google_setting';
      

b. Modify the configuration file

  • postgresql: application-[dev|prod].xml in spring.datasource
  • redis: application-[dev|prod].xml in spring.data.redis
  • mail: application.xml in spring.mail

Build and Run

  • Enter the project

    cd langchain4j-aideepin
    
  • Package:

    mvn clean package -Dmaven.test.skip=true
    
  • Run

    • Start with jar:
    cd adi-bootstrap/target
    nohup java -jar -Xms768m -Xmx1024m -XX:+HeapDumpOnOutOfMemoryError adi-bootstrap-0.0.1-SNAPSHOT.jar --spring.profiles.active=[dev|prod] dev/null 2>&1 &
    
    • Start with docker
    cd adi-bootstrap
    docker build . -t aideepin:0.0.1
    docker run -d \
      --name=aideepin \
      -e APP_PROFILE=[dev|prod] \
      -v="/data/aideepin/logs:/data/logs" \
      aideepin:0.0.1
    

TODO:

  • Advanced RAG
    • Query compression √
    • Query routing
    • Re-rank: support local rerank model
  • AI Chat
    • Multi-role √
    • Preset general roles (created in admin backend) √
  • Image Models:
    • DALL-E 2 & DALL-E 3 √
    • Chat view √
    • Gallery view √
    • Open/collect images √
    • Image comments √
  • Knowledge Base:
    • Vector √
    • Knowledge graph √
    • Set the number of document recalls
      • Auto-adjust (based on LLM context window size) √
      • Manual adjustment √
    • Set the minimum score for document recall √
    • Set the overlap number when chunking √
    • Set temperature when requesting model √
    • Strict mode and non-strict mode √
    • Answer source √
    • Support fetching online documents
    • FAQ
    • Comments
  • Multi-modal support
    • Image √
    • Audio
    • Video
  • Tools
    • FAQ extraction
    • Document conversation
    • Translation
    • Image processing
      • Image editing
      • Image matting
      • Image expansion
      • Image synthesis
      • Background switching
  • Search Engines
    • Google √
    • Bing
    • Baidu
  • Quota statistics and control
    • Free quota statistics and limits
    • Paid quota statistics and limits
    • Total quota statistics
  • Open API

Screenshots

AI Chat: 1691583184761

AI Drawing:

draw_001

draw_002

Knowledge Base: kbindex

kb01

Vectorization:

kb02

kb03

Knowledge Graph:

kb_graph_01

kb_graph_02

Quota Statistics:

1691583329105.png