Fix: prompt template overrides (#136)

* Added single-target command-line config generator.  Mainly using for
testing ATM.

* Slightly tweak the config decode so that components can over-ride the
'with' method which injects parameters.

* Deliberately break the prompt-generic template.  Could do better, this
is temporary.

* Add 'prompt-overrides' component, injects new prompts.

* Removed prompt generic reference, not used

* prompt-generic is no longer supported
This commit is contained in:
cybermaggedon 2024-11-05 21:17:34 +00:00 committed by GitHub
parent 8a2126bba5
commit 53c958aaff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 188 additions and 91 deletions

View file

@ -3,9 +3,7 @@ local components = import "components.jsonnet";
local apply = function(p, components)
local component = components[p.name];
(component + {
local base = {
with:: function(k, v) self + {
[k]:: v
@ -18,7 +16,11 @@ local apply = function(p, components)
self
),
}).with_params(p.parameters);
};
local component = base + components[p.name];
component.with_params(p.parameters);
local decode = function(config)
local add = function(state, c) state + apply(c, components);