Add Promptkit definition conformance coverage
This commit is contained in:
12
testdata/promptkit-v0.9/config.yml
vendored
Normal file
12
testdata/promptkit-v0.9/config.yml
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
prompt_dir: ./testdata/promptkit-v0.9/prompts
|
||||
profile_dir: ./testdata/promptkit-v0.9/profiles
|
||||
schema_dir: ./testdata/promptkit-v0.9/schemas
|
||||
backends:
|
||||
fixture-custom:
|
||||
endpoint: http://127.0.0.1:11434/v1
|
||||
api_key_env: FIXTURE_BACKEND_API_KEY
|
||||
extra_params:
|
||||
backend_option:
|
||||
enabled: true
|
||||
concurrency_limit: 2
|
||||
queue_capacity: 0
|
||||
1
testdata/promptkit-v0.9/inputs/source.md
vendored
Normal file
1
testdata/promptkit-v0.9/inputs/source.md
vendored
Normal file
@@ -0,0 +1 @@
|
||||
The fixture source contains stable, synthetic material.
|
||||
16
testdata/promptkit-v0.9/profiles/custom-base.yaml
vendored
Normal file
16
testdata/promptkit-v0.9/profiles/custom-base.yaml
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
id: custom-base
|
||||
backend: fixture-custom
|
||||
model: fixture-base-model
|
||||
temperature: 0.25
|
||||
max_tokens: 640
|
||||
top_p: 0.9
|
||||
timeout_seconds: 45
|
||||
service_tier: flex
|
||||
reasoning_effort: medium
|
||||
api_key_env: FIXTURE_PROFILE_API_KEY
|
||||
extra_params:
|
||||
routing:
|
||||
order:
|
||||
- primary
|
||||
- fallback
|
||||
allow_fallback: true
|
||||
4
testdata/promptkit-v0.9/profiles/custom-derived.yml
vendored
Normal file
4
testdata/promptkit-v0.9/profiles/custom-derived.yml
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
id: custom-derived
|
||||
base_profile: custom-base
|
||||
model: fixture-derived-model
|
||||
reasoning_effort: high
|
||||
10
testdata/promptkit-v0.9/profiles/endpoint-only.yaml
vendored
Normal file
10
testdata/promptkit-v0.9/profiles/endpoint-only.yaml
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
id: endpoint-only
|
||||
endpoint: http://127.0.0.1:8000/v1
|
||||
model: fixture-endpoint-model
|
||||
temperature: 0.1
|
||||
max_tokens: 128
|
||||
top_p: 0.75
|
||||
timeout_seconds: 30
|
||||
extra_params:
|
||||
endpoint_option:
|
||||
nested: true
|
||||
31
testdata/promptkit-v0.9/prompts/complete-v1.yaml
vendored
Normal file
31
testdata/promptkit-v0.9/prompts/complete-v1.yaml
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
id: compat.complete
|
||||
version: "1.0.0"
|
||||
description: Exercise the complete Promptkit v0.9 prompt-definition surface.
|
||||
default_profile: custom-derived
|
||||
session_id: 'fixture-{{.topic}}'
|
||||
inputs:
|
||||
- name: source
|
||||
required: true
|
||||
content_type: text/markdown
|
||||
description: Source material rendered by a file-backed message.
|
||||
- name: context
|
||||
required: false
|
||||
content_type: text/plain
|
||||
description: Optional caller context.
|
||||
messages:
|
||||
- role: developer
|
||||
content: 'Use the topic {{.topic}}.'
|
||||
cache_control:
|
||||
type: ephemeral
|
||||
ttl: 1h
|
||||
- role: system
|
||||
content_file: ./messages/complete.system.md
|
||||
- role: user
|
||||
content_file: ./messages/complete.user.md
|
||||
- role: assistant
|
||||
content: Return one JSON object.
|
||||
output:
|
||||
format: json
|
||||
validation_mode: json_schema
|
||||
schema_path: complete.schema.json
|
||||
repair_attempts: 2
|
||||
10
testdata/promptkit-v0.9/prompts/complete-v2.yml
vendored
Normal file
10
testdata/promptkit-v0.9/prompts/complete-v2.yml
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
id: compat.complete
|
||||
version: "2.0.0"
|
||||
default_profile: endpoint-only
|
||||
messages:
|
||||
- role: user
|
||||
content: Version two has no declared inputs.
|
||||
output:
|
||||
format: text
|
||||
validation_mode: basic
|
||||
repair_attempts: 1
|
||||
10
testdata/promptkit-v0.9/prompts/json.yaml
vendored
Normal file
10
testdata/promptkit-v0.9/prompts/json.yaml
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
id: compat.json
|
||||
version: "1.0.0"
|
||||
default_profile: endpoint-only
|
||||
messages:
|
||||
- role: user
|
||||
content: Return JSON.
|
||||
output:
|
||||
format: json
|
||||
validation_mode: json
|
||||
repair_attempts: 0
|
||||
1
testdata/promptkit-v0.9/prompts/messages/complete.system.md
vendored
Normal file
1
testdata/promptkit-v0.9/prompts/messages/complete.system.md
vendored
Normal file
@@ -0,0 +1 @@
|
||||
Use the supplied source without inventing details.
|
||||
4
testdata/promptkit-v0.9/prompts/messages/complete.user.md
vendored
Normal file
4
testdata/promptkit-v0.9/prompts/messages/complete.user.md
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
Topic: {{.topic}}
|
||||
|
||||
Source:
|
||||
{{input "source"}}
|
||||
10
testdata/promptkit-v0.9/prompts/none.yaml
vendored
Normal file
10
testdata/promptkit-v0.9/prompts/none.yaml
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
id: compat.none
|
||||
version: "1.0.0"
|
||||
default_profile: endpoint-only
|
||||
messages:
|
||||
- role: user
|
||||
content: Return text.
|
||||
output:
|
||||
format: text
|
||||
validation_mode: none
|
||||
repair_attempts: 0
|
||||
11
testdata/promptkit-v0.9/schemas/complete.schema.json
vendored
Normal file
11
testdata/promptkit-v0.9/schemas/complete.schema.json
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"type": "object",
|
||||
"required": ["summary"],
|
||||
"properties": {
|
||||
"summary": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
Reference in New Issue
Block a user