Document appended request messages

This commit is contained in:
2026-08-26 02:19:44 +00:00
parent b0999112cc
commit 174516cb39
11 changed files with 80 additions and 24 deletions

View File

@@ -82,7 +82,13 @@ allowed.
### Messages And Templates
Each message has a non-empty `role` and exactly one of:
Each message has a `role` that Promptkit trims and lowercases. It must then be
exactly one of `developer`, `system`, `user`, or `assistant`; blank, custom,
`tool`, and `function` roles are invalid. This intentionally tightens the
previous nonblank-string rule. Consumers migrating to the next minor release
must update any nonstandard prompt-definition roles before upgrading.
Each message also has exactly one of:
- `content`, containing an inline Go template; or
- `content_file`, naming a file whose contents are the Go template.