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 🌟
AIDEEPIN
|__ Server (langchain4j-aideepin)
|__ User Web (langchain4j-aideepin-web)
|__ Admin Web (langchain4j-aideepin-admin)
Backend source repository: github or gitee
Frontend projects:
- 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
- ChatGPT 3.5
- 通义千问
- 文心一言
- Ollama
- DALL-E 2
- DALL-E 3
Bing (TODO)
Baidu (TODO)
This repository is for the backend service
Tech stack:
- jdk17
- springboot3.0.5
- langchain4j (Java version of LangChain)
- Postgresql
- pgvector extension: https://github.com/pgvector/pgvector
- Apache AGE extension: https://github.com/apache/age
Frontend tech stack:
- vue3
- vite
- typescript
- pnpm
- pinia
- naiveui
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);
- Configure AI platforms
-
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';
- Google configuration
b. Modify the configuration file
- postgresql:
application-[dev|prod].xml
inspring.datasource
- redis:
application-[dev|prod].xml
inspring.data.redis
- mail:
application.xml
inspring.mail
-
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
- 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
AI Drawing:
Vectorization:
Knowledge Graph:
Quota Statistics: