Commit f38d93d
feat(core): refactor LLMBot with Config dataclass and improved architecture
- Add Config dataclass for centralized configuration management
- Refactor LLMBot initialization to use Config instead of individual parameters
- Add TemplateManager class for better Jinja2 template handling
- Implement custom BalatroLLMError exception for better error handling
- Add retry logic with exponential backoff for LLM API calls
- Enhance logging with setup_logging function and structured formatting
- Add structured save path generation based on version/model/template
- Implement project version detection from pyproject.toml
- Improve game loop with better state handling and error management
- Add comprehensive input validation and error messages
Co-Authored-By: Claude <noreply@anthropic.com>1 parent cd6858e commit f38d93d
2 files changed
Lines changed: 341 additions & 124 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
| 64 | + | |
68 | 65 | | |
69 | 66 | | |
70 | 67 | | |
| |||
81 | 78 | | |
82 | 79 | | |
83 | 80 | | |
84 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
85 | 88 | | |
86 | 89 | | |
87 | 90 | | |
| |||
0 commit comments