system.txt -> .bantamsys.txt
This commit is contained in:
@@ -35,7 +35,7 @@ The Go port is a single `main.go` plus four platform files (`term_linux.go`, `te
|
||||
|
||||
### Running Bantam
|
||||
|
||||
All implementations read `model.cfg` (or `.bantam.cfg`, which takes priority if present) and `system.txt` from the current working directory.
|
||||
All implementations read `model.cfg` (or `.bantam.cfg`, which takes priority if present) and `.bantamsys.txt` from the current working directory.
|
||||
|
||||
1. Configure `model.cfg` (or `.bantam.cfg`, which takes priority) with your API settings:
|
||||
```ini
|
||||
@@ -93,7 +93,7 @@ Using these rules, everyone can build their own copy of Bantam from scratch in l
|
||||
|
||||
### High-Level Overview
|
||||
|
||||
1. **Initialization**: Read `system.txt` and the config file (`.bantam.cfg` if present, else `model.cfg`). Discover context window size from the `/models` endpoint (or fallback to `context_window` from `model.cfg` or 200,000 tokens). Prepare an array of messages starting with the system prompt `{"role": "system", "content": system_prompt}`.
|
||||
1. **Initialization**: Read `.bantamsys.txt` and the config file (`.bantam.cfg` if present, else `model.cfg`). Discover context window size from the `/models` endpoint (or fallback to `context_window` from `model.cfg` or 200,000 tokens). Prepare an array of messages starting with the system prompt `{"role": "system", "content": system_prompt}`.
|
||||
2. **Input Processing**: Take user prompt (via command-line file parameter or interactive stdin). If prefixed with `!`, execute the command directly via `shell_exec` without appending to conversation context. Otherwise, append `{"role": "user", "content": prompt}`, and invoke `AL(cfg, messages)`.
|
||||
3. **Agentic Loop (`AL`)**:
|
||||
- Send `messages` and tool definitions to the OpenAI-compatible `/chat/completions` API endpoint with custom `User-Agent` headers and `stream_options: {"include_usage": true}`.
|
||||
@@ -109,7 +109,7 @@ Using these rules, everyone can build their own copy of Bantam from scratch in l
|
||||
|
||||
### Main program
|
||||
|
||||
1. Read system prompt from `system.txt` (default if missing).
|
||||
1. Read system prompt from `.bantamsys.txt` (default if missing).
|
||||
2. Read model parameters from the config file (`.bantam.cfg` if present, else `model.cfg`) in `key=value` format and discover context window size.
|
||||
3. Prepare a new message list with the system prompt (`role: "system"`).
|
||||
4. Read the first command-line parameter. If non-empty, read user prompt from the specified file. If prefixed with `!`, execute the shell command directly via `shell_exec` and exit. Otherwise, append to `messages` (`role: "user"`), run `AL(cfg, messages)`, display token usage, and exit.
|
||||
@@ -172,7 +172,7 @@ When enabled, the interactive console uses a subtle ANSI palette: the pending-re
|
||||
|
||||
## MicroBantam
|
||||
|
||||
MicroBantam (`mb`) is a compressed Perl 5 reference implementation of the same agent in **under 100 SLOC**, written to stay readable while keeping the full agentic core. It reads the config file (`.bantam.cfg` if present, else `model.cfg`) and `system.txt` from the current working directory.
|
||||
MicroBantam (`mb`) is a compressed Perl 5 reference implementation of the same agent in **under 100 SLOC**, written to stay readable while keeping the full agentic core. It reads the config file (`.bantam.cfg` if present, else `model.cfg`) and `.bantamsys.txt` from the current working directory.
|
||||
|
||||
### Features
|
||||
|
||||
@@ -203,7 +203,7 @@ MicroBantam (`mb`) is a compressed Perl 5 reference implementation of the same a
|
||||
|
||||
- `main.go`, `term_linux.go`, `term_bsd.go`, `term_windows.go`, `term_other.go` — Go implementation (stdlib only, module `code.luxferre.top/luxferre/bantam`)
|
||||
- `mb` — MicroBantam, compressed Perl 5 implementation (core modules only, under 100 SLOC)
|
||||
- `model.cfg` (or `.bantam.cfg`, which takes priority), `system.txt` — shared configuration and system prompt
|
||||
- `model.cfg` (or `.bantam.cfg`, which takes priority), `.bantamsys.txt` — shared configuration and system prompt
|
||||
- `README.md` — this document
|
||||
|
||||
## Extra tools
|
||||
@@ -301,7 +301,7 @@ Set the `BANTAM_TOOLS_DIR` environment variable (or the `bantam_tools_dir` key i
|
||||
|
||||
### Is there any common config place for Bantam?
|
||||
|
||||
No, loading the config file (`.bantam.cfg` if present, else `model.cfg`) and `system.txt` is deliberately only supported from the current working directory. This allows natural separation of configs and system prompts per project. In case there's no `system.txt` inside the project, the concise and sensible default system prompt will be loaded. In case there's no config file inside the project, Bantam will use the free Big Pickle model from OpenCode Zen with the temperature 0.7. Big Pickle has been chosen as the default because it has no set expiration date, unlike other OpenCode's keyless tiers.
|
||||
No, loading the config file (`.bantam.cfg` if present, else `model.cfg`) and `.bantamsys.txt` is deliberately only supported from the current working directory. This allows natural separation of configs and system prompts per project. In case there's no `.bantamsys.txt` inside the project, the concise and sensible default system prompt will be loaded. In case there's no config file inside the project, Bantam will use the free Big Pickle model from OpenCode Zen with the temperature 0.7. Big Pickle has been chosen as the default because it has no set expiration date, unlike other OpenCode's keyless tiers.
|
||||
|
||||
### Why no MCP support?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user