mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-03 15:01:00 +02:00
Make templating work more flexibly (#44)
* Restructure directory * Config loading * Variable override points in JSONNET templates, separate pulsar-manager template * Bump version * Tidy chunking * Simplified prompt overrides * Update config loader * Fix recursive chunker template
This commit is contained in:
parent
f10c2822f4
commit
f7a30006ad
84 changed files with 1140 additions and 1164 deletions
|
|
@ -1,34 +1,17 @@
|
|||
local base = import "base.jsonnet";
|
||||
local images = import "images.jsonnet";
|
||||
local url = import "url.jsonnet";
|
||||
local prompts = import "../prompts/mixtral.jsonnet";
|
||||
local base = import "base/base.jsonnet";
|
||||
local images = import "values/images.jsonnet";
|
||||
local url = import "values/url.jsonnet";
|
||||
local prompts = import "prompts/cohere.jsonnet";
|
||||
{
|
||||
services +: {
|
||||
|
||||
chunker: base + {
|
||||
image: images.trustgraph,
|
||||
command: [
|
||||
"${CHUNKER:-chunker-token}",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"--chunk-size",
|
||||
"150",
|
||||
"--chunk-overlap",
|
||||
"10",
|
||||
],
|
||||
deploy: {
|
||||
resources: {
|
||||
limits: {
|
||||
cpus: '0.5',
|
||||
memory: '128M'
|
||||
},
|
||||
reservations: {
|
||||
cpus: '0.1',
|
||||
memory: '128M'
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
// Override chunking
|
||||
"chunk-size":: 150,
|
||||
"chunk-overlap":: 10,
|
||||
|
||||
"cohere-key":: "${COHERE_KEY}",
|
||||
"cohere-temperature":: 0.0,
|
||||
|
||||
services +: {
|
||||
|
||||
"text-completion": base + {
|
||||
image: images.trustgraph,
|
||||
|
|
@ -37,9 +20,9 @@ local prompts = import "../prompts/mixtral.jsonnet";
|
|||
"-p",
|
||||
url.pulsar,
|
||||
"-k",
|
||||
"${COHERE_KEY}",
|
||||
$["cohere-key"],
|
||||
"-t",
|
||||
"0.0",
|
||||
$["cohere-temperature"],
|
||||
],
|
||||
deploy: {
|
||||
resources: {
|
||||
|
|
@ -62,9 +45,9 @@ local prompts = import "../prompts/mixtral.jsonnet";
|
|||
"-p",
|
||||
url.pulsar,
|
||||
"-k",
|
||||
"${COHERE_KEY}",
|
||||
$["cohere-key"],
|
||||
"-t",
|
||||
"0.0",
|
||||
$["cohere-temperature"],
|
||||
"-i",
|
||||
"non-persistent://tg/request/text-completion-rag",
|
||||
"-o",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue