ChatGPT-Java-FunAi  by huangPengL

FunAi: SpringBoot backend for OpenAI APIs, chatbot, and more

created 2 years ago
914 stars

Top 40.7% on sourcepulse

GitHubView on GitHub
Project Summary

FunAi is a Java-based backend project built with SpringBoot, designed for learning and exploring advanced AI capabilities. It targets developers and enthusiasts interested in integrating large language models, image generation, and intelligent document processing into applications. The project offers a comprehensive suite of features, including conversational AI, PDF analysis with semantic search, and text-to-image generation, aiming to provide a robust platform for building AI-powered services.

How It Works

FunAi leverages OpenAI's APIs for ChatGPT and embeddings, integrating them within a SpringBoot architecture. For document processing, it employs recursive text splitting and vectorization, storing embeddings in vector databases like Pinecone or Milvus for semantic similarity matching. Conversational context is managed using Guava Cache for optimized response times, and features like streaming output and multi-turn conversations are supported. Image generation is handled via integrations with MidJourney and Stable Diffusion.

Quick Start & Requirements

  • Installation: Requires MySQL 5.7+, Redis 7.0.11+, and optionally Pinecone or a locally hosted Milvus 2.2.5.
  • Prerequisites: Java 1.8 (JDK), scientific internet access or an overseas server, and OpenAI API keys. Configuration involves updating application.properties with database, Redis, and API key details.
  • Setup: Import funai.sql into MySQL. Configure API keys in the admin_apikey table for OpenAI and Pinecone.
  • Resources: Links to the frontend repository (not yet public), OpenAI API documentation, and Pinecone documentation are provided.

Highlighted Details

  • Supports ChatGPT (3.5/4), GPT-4, MidJourney V4, and Stable Diffusion.
  • Advanced PDF/document analysis with semantic search and multi-source comparison.
  • Features include AI customer service, text-based adventure games, and an AI assistant with prompt management.
  • API key management with polling, rate limiting, and expiration detection.

Maintenance & Community

The project is actively developed with contributions acknowledged from team members and external supporters. Community interaction is encouraged via WeChat groups and direct contact for customization or collaboration.

Licensing & Compatibility

Licensed under Apache-2.0. The README explicitly states the code is for demo and testing only and prohibits commercial use without explicit authorization and attribution.

Limitations & Caveats

The project is primarily for learning and demonstration; commercial use is restricted. Some advanced features like "Magic Community" and "Oral Practice" are marked as TODO. The frontend is not yet publicly available.

Health Check
Last commit

2 years ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
41 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.