cd41e9e33e
- **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.**
16 lines
343 B
Python
16 lines
343 B
Python
import sys
|
|
|
|
|
|
class StreamTokenHandler:
|
|
"""스트림 토큰을 stdout에 실시간 출력하는 핸들러."""
|
|
|
|
def __call__(self, token: str) -> None:
|
|
print(token, end="", flush=True)
|
|
|
|
|
|
class StreamEndHandler:
|
|
"""스트림 종료 시 개행을 출력하는 핸들러."""
|
|
|
|
def __call__(self) -> None:
|
|
print("\n")
|