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
Copy file name to clipboardExpand all lines: README.md
+44Lines changed: 44 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,50 @@ the `shai` binary will be installed in `$HOME/.local/bin`
29
29
30
30
## Configure a provider and Run!
31
31
32
+
### Configuration files
33
+
34
+
Shai can be configured via **configuration files** written in JSON. By default, the configuration file is `auth.config` located in `~/.config/shai/`. The file defines the list of LLM providers, the selected provider, model, and tool call method.
-**providers**: an array of provider definitions. Each provider can specify environment variables (`env_vars`), the model name, the tool call method (`FunctionCall` or `Chat`), and optionally `max_context_tokens` to limit the context size.
55
+
-**selected_provider**: the index of the provider to use (starting at `0`).
56
+
-**max_context_tokens** (optional, per provider): maximum number of tokens that can be sent in the context to the LLM. If omitted, the default for the model is used.
57
+
58
+
You can create multiple configuration files for different agents (see the *Custom Agent* section). To use a specific configuration, place the file in `~/.config/shai/agents/` and run the agent by its filename (without the `.config` extension):
59
+
```
60
+
shai my_custom_agent
61
+
```
62
+
63
+
Shai will automatically load the configuration, set the required environment variables, and use the selected provider for all subsequent interactions.
64
+
65
+
### Using the configuration
66
+
67
+
-**Automatic loading**: If a `.shai.config` file is present in the current directory, Shai will load it automatically.
68
+
-**Explicit loading**: Use the `--config <path>` flag to specify a custom configuration file:
The configuration system allows you to switch providers, models, or tool call methods without recompiling the binary.
74
+
75
+
32
76
By default `shai` uses OVHcloud as an anonymous user meaning you will be rate limited! If you want to sign in with your account or select another provider, run:
0 commit comments