You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> You can use [direnv](https://direnv.net/) to automatically activate the environment when you enter the project directory. The `.envrc.example` file contains an example configuration for direnv.
64
64
65
-
66
65
### ⚙️ LLM Configuration
67
66
68
67
BalatroLLM performs single requests to an OpenAI-compatible chat/completions endpoint. You need to configure:
@@ -86,19 +85,19 @@ The default configuration uses [OpenRouter](https://openrouter.ai/), which provi
86
85
87
86
The typical workflow to run BalatroLLM is:
88
87
89
-
1. Start Balatro with the BalatroBot mod:
88
+
- Start Balatro with the BalatroBot mod:
90
89
91
90
```bash
92
91
bash balatro.sh
93
92
```
94
93
95
-
2. Run the bot, typically with multiple runs using the same configuration:
94
+
- Run the bot, typically with multiple runs using the same configuration:
When running `uv sync`, `uv` automatically downloads the required Python version, creates a new environment at `.venv`, and installs the project dependencies.
33
33
34
-
3. Activate environment
34
+
- Activate environment
35
35
36
36
```bash
37
37
source .venv/bin/activate
38
38
```
39
39
40
-
4. Test that the new commands are available
40
+
- Test that the new commands are available
41
41
42
42
```bash
43
43
balatrollm --help
@@ -48,7 +48,7 @@ balatrobench --help
48
48
49
49
You can use [direnv](https://direnv.net/) to automatically activate the environment when you enter the project directory. The `.envrc.example` file contains an example configuration for direnv.
50
50
51
-
## Provider Configuration
51
+
## Provider Configuration
52
52
53
53
You need to configure your chosen provider. We recommend configuring the provider through environment variables using `.envrc` (see `.envrc.example`)
The `BALATROBOT_*` variables are used to configure Balatro and BalatroBot. It is recommended to set the variables that you don't change often in the `.envrc`.
28
28
29
29
-`BALATROBOT_HOST`: The host to run the server on. Defaults to `127.0.0.1`.
30
+
30
31
-`BALATROBOT_PORT`: The port to run the server on. Defaults to `12346`.
31
32
32
33
-`BALATROBOT_HEADLESS`: Avoid rendering the game on the screen. Set to `1` to enable.
34
+
33
35
-`BALATROBOT_FAST`: Faster animations and gameplay. Set to `1` to enable.
36
+
34
37
-`BALATROBOT_AUDIO`: Enable audio. Set to `1` to enable.
38
+
35
39
-`BALATROBOT_RENDER_ON_API`: Render the frame only on an API call.
36
40
37
41
These are the environment variables set by `balatro.sh` using its flags. For example, to run the game in fast mode, you can run: `bash balatro.sh --fast`.
@@ -43,13 +47,19 @@ Usually, you don't need to set these variables manually.
43
47
The `BALATROLLM_*` variables are used as defaults for the BalatroLLM CLI. It is recommended to set the variables that you don't change often in the `.envrc`.
44
48
45
49
-`BALATROLLM_BASE_URL`: The base URL to use. (required)
50
+
46
51
-`BALATROLLM_API_KEY`: The API key to use. (usually required)
52
+
47
53
-`BALATROLLM_MODEL`: The model to use. (required)
48
54
49
55
-`BALATROLLM_STRATEGY`: The strategy to use. (default: `default`)
56
+
50
57
-`BALATROLLM_RUNS_PER_SEED`: The number of runs per seed. (default: `1`)
58
+
51
59
-`BALATROLLM_SEEDS`: The seeds to use. If empty, a random seed is used. You can also use a comma-separated list of seeds.
60
+
52
61
-`BALATROLLM_NO_SCREENSHOT`: Whether to take screenshots. Screenshots are not available in headless mode. (default: `0`, i.e. take screenshots)
62
+
53
63
-`BALATROLLM_USE_DEFAULT_PATHS`: Whether to use BalatroBot's default storage paths. It's not recommended to change this. (default: `0`)
54
64
55
65
Each of these variables has a corresponding BalatroLLM CLI flag. For example, `--model` is the BalatroLLM CLI flag for `BALATROLLM_MODEL`.
0 commit comments