Allow prompt version selection without inputs
This commit is contained in:
14
docs/api.md
14
docs/api.md
@@ -32,14 +32,11 @@ returns `413 response_too_large`.
|
||||
### Request Body
|
||||
|
||||
The maintained [request example](../examples/http-run.json) is a complete
|
||||
copyable shape. The smallest valid shape is:
|
||||
copyable shape. At the HTTP adapter boundary, the smallest valid shape is:
|
||||
|
||||
```json
|
||||
{
|
||||
"prompt_id": "generic.markdown_summary",
|
||||
"inputs": {
|
||||
"transcript": {"type": "inline", "body": "Source text"}
|
||||
}
|
||||
"prompt_id": "generic.markdown_summary"
|
||||
}
|
||||
```
|
||||
|
||||
@@ -48,7 +45,7 @@ copyable shape. The smallest valid shape is:
|
||||
| `prompt_id` | yes | Non-blank prompt ID. |
|
||||
| `prompt_version` | no | Prompt version filter. |
|
||||
| `profile_id` | no | Execution-profile ID; otherwise the prompt must set `default_profile`. |
|
||||
| `inputs` | yes | Non-empty object mapping input names to references. |
|
||||
| `inputs` | no | Optional object mapping input names to references. Promptkit decides whether the selected definition needs them. |
|
||||
| `vars` | no | Object mapping template-variable names to strings. |
|
||||
| `model` | no | Runtime model-override object. |
|
||||
| `include_raw_output` | no | Include `raw_model_output` when true. |
|
||||
@@ -83,8 +80,9 @@ empty string explicitly clears it. JSON `null` is treated as omission.
|
||||
### Strict JSON
|
||||
|
||||
Request decoding rejects malformed JSON, unknown fields at every request level,
|
||||
and trailing JSON tokens with `400 invalid_json`. A blank `prompt_id` or
|
||||
empty `inputs` object returns `400 invalid_request`.
|
||||
and trailing JSON tokens with `400 invalid_json`. A blank `prompt_id` returns
|
||||
`400 invalid_request`. Omitted or empty `inputs` are passed to Promptkit, which
|
||||
reports any definition-required or template-referenced inputs.
|
||||
|
||||
### Success Response
|
||||
|
||||
|
||||
Reference in New Issue
Block a user