A seamless integration of DeepSeek's AI capabilities into Spring Boot applications. Add natural language processing, chatbots, and intelligent text generation to your Java projects with just a few lines of code.
Demo Article: Medium Tutorial
API Documentation: DeepSeek API Docs
- 🚀 Text generation via DeepSeek's language models
- 💬 Conversational AI chatbot implementation
- ⚡ Spring Boot-native configuration
- 🔒 Secure API key management
- 📦 Ready-to-deploy REST API endpoints
- Java 17+
- Spring Boot 3.2+
- Maven/Gradle
- DeepSeek API Key
git clone https://github.com/sauravsku/DeepSeek-Spring-Integration.git
cd DeepSeek-Spring-IntegrationCreate src/main/resources/application.properties:
deepseek.api.key=your_api_key_here
deepseek.api.url=https://api.deepseek.com/v1/chat/completionsmvn spring-boot:run
# or
./gradlew bootRuncurl -X POST -H "Content-Type: application/json" \
-d '"Explain quantum computing in simple terms"' \
http://localhost:8080/api/ai/generate{
"id": "chatcmpl-123",
"object": "chat.completion",
"choices": [{
"message": {
"role": "assistant",
"content": "Quantum computing uses quantum bits..."
}
}]
}├── src
│ └── main
│ ├── java
│ │ └── com
│ │ └── deepseek
│ │ ├── config # Configuration classes
│ │ ├── controller # REST endpoints
│ │ └── service # Business logic
│ └── resources
│ └── application.properties
├── LICENSE
└── README.md
# Optional parameters
deepseek.model=deepseek-chat
deepseek.temperature=0.7
deepseek.max_tokens=1000# Add to application.properties
logging.level.org.apache.http=DEBUG| Endpoint | Method | Description |
|---|---|---|
/api/ai/generate |
POST | Process text generation requests |
Request Body Format:
"Your prompt text here"We welcome contributions! Please follow these steps:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Built with ❤️ by Saurav Kumar