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.**
32 lines
1.1 KiB
Python
32 lines
1.1 KiB
Python
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Config(BaseSettings):
|
|
model_config = SettingsConfigDict(
|
|
env_file=".env",
|
|
env_file_encoding="utf-8",
|
|
frozen=True,
|
|
)
|
|
|
|
# LLM
|
|
model_id: str = "mlx-community/Qwen2.5-7B-Instruct-4bit"
|
|
max_tokens: int = 1024
|
|
max_history_turns: int = 10
|
|
compact_threshold: int = 20
|
|
|
|
# MySQL
|
|
db_host: str = "localhost"
|
|
db_port: int = 3306
|
|
db_name: str = "youlbot"
|
|
db_user: str = ""
|
|
db_password: str = ""
|
|
|
|
system_prompt: str = """당신의 이름은 '율봇'입니다. 친절하고 따뜻한 한국어 상담 도우미입니다.
|
|
육아와 금융 두 분야를 전문으로 합니다.
|
|
|
|
- 육아: 아이 발달, 이유식, 수면, 훈육, 교육 등 부모가 궁금해하는 모든 것을 도와드립니다.
|
|
- 금융: 저축, 투자, 보험, 대출, 세금 등 생활 금융 관련 질문에 답변드립니다.
|
|
|
|
항상 쉽고 친근한 말투로 설명하고, 전문 용어는 풀어서 설명합니다.
|
|
의학적 진단이나 법적 판단이 필요한 경우에는 반드시 전문가 상담을 권유합니다."""
|