87 lines
4.1 KiB
Markdown
87 lines
4.1 KiB
Markdown
# Configuration Reference
|
|
|
|
This is the canonical reference for Scriptorium application settings. Prompt,
|
|
profile, schema, execution-setting, built-in profile, and framework credential
|
|
semantics are defined by the
|
|
[Promptkit v0.1.0 format reference](https://gitea.maximumdirect.net/eric/promptkit/src/tag/v0.1.0/docs/formats.md).
|
|
For command syntax, see the [CLI reference](cli.md); for HTTP request shapes and
|
|
outcomes, see the [HTTP API reference](api.md).
|
|
|
|
## Discovery And Precedence
|
|
|
|
Application settings are resolved in this order:
|
|
|
|
1. built-in Scriptorium defaults;
|
|
2. a configuration file; then
|
|
3. CLI overrides.
|
|
|
|
When `--config` is omitted, Scriptorium searches
|
|
`/usr/local/etc/scriptorium/config.yml` and then `/etc/scriptorium/config.yml`.
|
|
If neither exists, it uses built-in defaults. An explicit `--config` path must
|
|
exist and decode successfully.
|
|
|
|
The maintained [minimal configuration](../examples/config.yml) and
|
|
[complete configuration](../examples/config.full.yml) are copyable examples.
|
|
|
|
## Application Configuration File
|
|
|
|
Configuration is strict YAML: unknown fields are rejected. Empty string values
|
|
do not override a prior value. Raw API-key fields are not accepted.
|
|
|
|
| Field | Default | Meaning |
|
|
| --- | --- | --- |
|
|
| `prompt_dir` | unset | Promptkit prompt-definition source directory. `run`, `render`, and `serve` require an effective value. |
|
|
| `profile_dir` | unset | Optional custom Promptkit profile source directory overlaid on Promptkit built-ins. |
|
|
| `schema_dir` | `.` | Promptkit schema source directory for relative schema paths. |
|
|
| `server.addr` | `:8080` | Address used by `serve`. |
|
|
| `server.artifact_root` | unset | Root that enables HTTP `file` input references. |
|
|
| `server.max_request_bytes` | `16777216` | Maximum encoded HTTP request-body bytes; `0` disables the limit. |
|
|
| `server.max_artifact_bytes` | `16777216` | Maximum HTTP file-input artifact bytes; `0` disables the limit. |
|
|
| `server.max_response_bytes` | `16777216` | Maximum encoded HTTP response bytes; `0` disables the limit. |
|
|
| `defaults.render_format` | `text` | Default prepared-run output format: `text` or `json`. |
|
|
|
|
The size fields must be zero or greater. The [HTTP API](api.md) defines how
|
|
each limit is enforced and reported. `server.artifact_root` configures an HTTP
|
|
deployment boundary; see [operations](operations.md) for deployment handling.
|
|
|
|
## Framework Source Mapping
|
|
|
|
Scriptorium passes `prompt_dir`, `profile_dir`, and `schema_dir` to Promptkit
|
|
when constructing its engine. Scriptorium does not redefine or independently
|
|
parse those framework file formats.
|
|
|
|
- Prompt selection, versions, message templates, inputs, output contracts, and
|
|
session IDs are Promptkit contracts.
|
|
- Profile fields, numeric ranges, execution defaults, overlay precedence,
|
|
built-in profiles, and credential rules are Promptkit contracts.
|
|
- Schema path behavior and generated-content validation are Promptkit
|
|
contracts.
|
|
|
|
See the
|
|
[tagged Promptkit format reference](https://gitea.maximumdirect.net/eric/promptkit/src/tag/v0.1.0/docs/formats.md)
|
|
for all of those definitions. The files under
|
|
[`examples/prompts`](../examples/prompts/),
|
|
[`examples/profiles`](../examples/profiles/), and
|
|
[`examples/schemas`](../examples/schemas/) are maintained Scriptorium
|
|
application inputs using that tagged format.
|
|
|
|
## Credentials And Outbound Behavior
|
|
|
|
Scriptorium maps `--api-key-env` and HTTP `model.api_key_env` into Promptkit
|
|
request overrides. Keep secret values in environment variables and store only
|
|
their names in configuration or framework source files. Do not place raw keys
|
|
in configuration, prompts, profiles, CLI arguments, examples, or HTTP
|
|
payloads.
|
|
|
|
Promptkit's
|
|
[OpenAI-compatible integration contract](https://gitea.maximumdirect.net/eric/promptkit/src/tag/v0.1.0/docs/integrations/openai-compatible-chat.md)
|
|
defines outbound authentication, provider request mapping, transport limits,
|
|
and timeout layering.
|
|
|
|
## Related References
|
|
|
|
- [CLI reference](cli.md)
|
|
- [HTTP API reference](api.md)
|
|
- [Operations guide](operations.md)
|
|
- [Promptkit framework formats](https://gitea.maximumdirect.net/eric/promptkit/src/tag/v0.1.0/docs/formats.md)
|