- **Bootstrap IoC-based architecture with modular services.**
- **Implement `MlxModelService` for local LLM backend.** - **Introduce `DatabaseService` for MySQL integration.** - **Add `HistoryService` to manage conversation context.** - **Set up CLI interface via `CliUiService`.** - **Establish EventBus for token streaming.** - **Include conversation repository for data persistence.** - **Add environment-based configuration management.** - **Draft IoC architectural plan.**
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
class CliUiService:
|
||||
"""CLI 입출력 서비스."""
|
||||
|
||||
def show_banner(self, model_id: str) -> None:
|
||||
print(f"모델 로딩 중: {model_id}")
|
||||
print("(첫 실행 시 HuggingFace에서 자동 다운로드됩니다. 약 4.5GB)\n")
|
||||
print("=" * 50)
|
||||
print("육아 & 금융 상담 챗봇 시작!")
|
||||
print("종료: '종료' / 'quit' / 'exit' 입력")
|
||||
print("초기화: 'reset' 또는 'clear' 입력")
|
||||
print("=" * 50 + "\n")
|
||||
|
||||
def prompt_user(self) -> str:
|
||||
return input("나: ").strip()
|
||||
|
||||
def show_assistant_prefix(self) -> None:
|
||||
print("\n도우미: ", end="", flush=True)
|
||||
|
||||
def is_exit_command(self, text: str) -> bool:
|
||||
return text.lower() in ("종료", "quit", "exit")
|
||||
|
||||
def is_reset_command(self, text: str) -> bool:
|
||||
return text.lower() in ("reset", "clear", "초기화")
|
||||
Reference in New Issue
Block a user