Migrate maintained PromptKit definitions and examples

This commit is contained in:
2026-10-04 11:41:00 +00:00
parent 0df2aad3a8
commit 2027b80311
23 changed files with 244 additions and 221 deletions

View File

@@ -1,12 +1,5 @@
prompt_dir: ./testdata/promptkit-v0.9/prompts
profile_dir: ./testdata/promptkit-v0.9/profiles
promptkit_sources:
- directory: ./testdata/promptkit-v0.9/prompts
- directory: ./testdata/promptkit-v0.9/profiles
- file: ./testdata/promptkit-v0.9/framework/backends.yml
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

View File

@@ -0,0 +1,9 @@
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

View File

@@ -1,16 +1,17 @@
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
profiles:
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

View File

@@ -1,4 +1,5 @@
id: custom-derived
base_profile: custom-base
model: fixture-derived-model
reasoning_effort: high
profiles:
custom-derived:
extends: custom-base
model: fixture-derived-model
reasoning_effort: high

View File

@@ -1,10 +1,11 @@
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
profiles:
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

View File

@@ -1,31 +1,41 @@
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
prompts:
compat.complete:
"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
"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

View File

@@ -1,10 +0,0 @@
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

View File

@@ -1,10 +1,11 @@
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
prompts:
compat.json:
"1.0.0":
default_profile: endpoint-only
messages:
- role: user
content: Return JSON.
output:
format: json
validation_mode: json
repair_attempts: 0

View File

@@ -1,10 +1,11 @@
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
prompts:
compat.none:
"1.0.0":
default_profile: endpoint-only
messages:
- role: user
content: Return text.
output:
format: text
validation_mode: none
repair_attempts: 0