LogoBricksmith

AI Chat 브릭

AI 챗봇 기능 — LLM 기반 대화, 스트리밍 응답

AI Chat 브릭#

AI 챗봇/대화 기능을 제공하는 vertical slice 브릭입니다.

기본 정보#

항목
브릭명feature-ai_chat
기본 feature_nameai_chat
Primary EntityAiMessage
Secondary Entity-

주요 기능#

  • AI 대화 인터페이스
  • 스트리밍 응답 표시
  • 대화 히스토리 관리
  • 컨텍스트 기반 응답

생성 구조#

Frontend#

feature/application/ai_chat/
├── lib/src/
│   ├── data/           # Repository 구현, AI API 연동
│   ├── domain/         # AiMessage Entity, UseCase
│   ├── presentation/   # BLoC, 대화 Page, 메시지 버블 Widget
│   ├── route/          # GoRouter TypedRoute
│   └── di/             # Dependency Injection
└── test/

Backend#

backend/{project}_server/lib/src/feature/ai_chat/
├── endpoint/       # AI 대화 엔드포인트
├── service/        # LLM 연동 서비스
├── model/
│   └── entities/   # AiMessage (.spy.yaml)
├── exception/
├── validation/
└── test/

사용 예시#

bricksmith apply --feature ai_chat

# Entity 커스터마이징
bricksmith apply --feature ai_chat \
  --primary-entity BotResponse

변수#

VariableDefaultDescription
feature_nameai_chatFeature 모듈명
primary_entityAiMessage주요 Entity (AI 메시지)