Configuration for the AI model.
| 12 | |
| 13 | @dataclass |
| 14 | class ModelConfig: |
| 15 | """Configuration for the AI model.""" |
| 16 | |
| 17 | base_url: str = "http://localhost:8000/v1" |
| 18 | api_key: str = "EMPTY" |
| 19 | model_name: str = "autoglm-phone-9b" |
| 20 | max_tokens: int = 3000 |
| 21 | temperature: float = 0.0 |
| 22 | top_p: float = 0.85 |
| 23 | frequency_penalty: float = 0.2 |
| 24 | extra_body: dict[str, Any] = field(default_factory=dict) |
| 25 | lang: str = "cn" # Language for UI messages: 'cn' or 'en' |
| 26 | |
| 27 | |
| 28 | @dataclass |