Store one prompt definition per ID
This commit is contained in:
@@ -767,11 +767,12 @@ func preparedContractConfig(message string, keyRequired bool) promptkit.Config {
|
||||
"profiles": map[string]any{"profile": map[string]any{
|
||||
"endpoint": "http://example.test/v1", "model": "model", "api_key_required": keyRequired,
|
||||
}},
|
||||
"prompts": map[string]any{"prepared": map[string]any{"1": map[string]any{
|
||||
"prompts": map[string]any{"prepared": map[string]any{
|
||||
"version": "1",
|
||||
"default_profile": "profile",
|
||||
"messages": []any{map[string]any{"role": "user", "content": message}},
|
||||
"output": map[string]any{"format": "text", "validation_mode": "none"},
|
||||
}}},
|
||||
}},
|
||||
}),
|
||||
}}}
|
||||
}
|
||||
@@ -780,19 +781,19 @@ func preparedPromptSource(label string) fstest.MapFS {
|
||||
return fstest.MapFS{
|
||||
"prompt.yaml": &fstest.MapFile{Data: []byte(`prompts:
|
||||
prepared:
|
||||
"1":
|
||||
default_profile: profile
|
||||
inputs:
|
||||
- name: input
|
||||
required: true
|
||||
messages:
|
||||
- role: user
|
||||
content: 'Input={{input "input"}} Label={{.label}}'
|
||||
description: ` + label + `
|
||||
output:
|
||||
format: json
|
||||
validation_mode: json_schema
|
||||
schema_path: schema.json
|
||||
version: "1"
|
||||
default_profile: profile
|
||||
inputs:
|
||||
- name: input
|
||||
required: true
|
||||
messages:
|
||||
- role: user
|
||||
content: 'Input={{input "input"}} Label={{.label}}'
|
||||
description: ` + label + `
|
||||
output:
|
||||
format: json
|
||||
validation_mode: json_schema
|
||||
schema_path: schema.json
|
||||
`)},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user