mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-25 16:36:21 +02:00
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:
parent
8a2126bba5
commit
53c958aaff
6 changed files with 188 additions and 91 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue