mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-17 09:11:03 +02:00
Add 'prompt-overrides' component, injects new prompts.
This commit is contained in:
parent
37fb2b7e46
commit
5122d52824
2 changed files with 32 additions and 1 deletions
28
templates/components/prompt-overrides.jsonnet
Normal file
28
templates/components/prompt-overrides.jsonnet
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
local base = import "base/base.jsonnet";
|
||||
local images = import "values/images.jsonnet";
|
||||
local url = import "values/url.jsonnet";
|
||||
local prompts = import "prompts/mixtral.jsonnet";
|
||||
local default_prompts = import "prompts/default-prompts.jsonnet";
|
||||
|
||||
{
|
||||
|
||||
with:: function(key, value)
|
||||
if (key == "system-template") then
|
||||
self + {
|
||||
prompts +:: {
|
||||
"system-template": value,
|
||||
}
|
||||
}
|
||||
else
|
||||
self + {
|
||||
prompts +:: {
|
||||
templates +:: {
|
||||
[key]: {
|
||||
prompt +:: value
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
} + default_prompts
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue