English | 한국어
A chatbot engine built on the LASA (Listen-Analyze-Solve-Answer) framework.
LASA is a framework for building effective chatbot systems, composed of four stages:
- Listen: receive and preprocess the user's input.
- Analyze: extract the user's intent and related entities.
- Solve: resolve the analyzed intent and shape a response strategy.
- Answer: generate the final response and deliver it to the user.
com.yk.chatbot
├── controller
│ └── ChatbotController.java # REST API controller
├── dto
│ ├── ChatRequest.java # request DTO
│ └── ChatResponse.java # response DTO
├── lasa # LASA framework interfaces
│ ├── Listen.java # listen interface
│ ├── Analyze.java # analyze interface
│ ├── AnalysisResult.java # analysis result class
│ ├── Solve.java # solve interface
│ ├── SolutionResult.java # solution result class
│ ├── Answer.java # answer interface
│ └── impl # implementations
│ ├── SimpleListener.java # default listener
│ ├── SimpleAnalyzer.java # default analyzer
│ ├── SimpleSolver.java # default solver
│ └── SimpleAnswerer.java # default answerer
└── service
└── LasaChatbotService.java # LASA-based chatbot service
POST /api/v1/chat
Content-Type: application/json
{
"message": "How's the weather today?"
}{
"reply": "It is currently sunny in Seoul, 23°C.",
"intent": "weather"
}To add a new intent or extend functionality:
- Add the new intent pattern in
SimpleAnalyzer - Implement handling logic for the new intent in
SimpleSolver - Add new DTOs / entity types as needed
- Spring Boot
- Lombok