mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-25 16:36:21 +02:00
Dual model templates (#263)
* Dual-mode templates * Fixed generate-all so that works * Fix ability to specify Claude model
This commit is contained in:
parent
1bb1112569
commit
cec9e29222
24 changed files with 725 additions and 360 deletions
|
|
@ -61,59 +61,5 @@ local prompts = import "prompts/mixtral.jsonnet";
|
|||
|
||||
},
|
||||
|
||||
"text-completion-rag" +: {
|
||||
|
||||
create:: function(engine)
|
||||
|
||||
local cfgVol = engine.secretVolume(
|
||||
"vertexai-creds",
|
||||
"./vertexai",
|
||||
{
|
||||
"private.json": importstr "vertexai/private.json",
|
||||
}
|
||||
);
|
||||
|
||||
local container =
|
||||
engine.container("text-completion-rag")
|
||||
.with_image(images.trustgraph)
|
||||
.with_command([
|
||||
"text-completion-vertexai",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"-k",
|
||||
$["vertexai-private-key"],
|
||||
"-r",
|
||||
$["vertexai-region"],
|
||||
"-x",
|
||||
std.toString($["vertexai-max-output-tokens"]),
|
||||
"-t",
|
||||
"%0.3f" % $["vertexai-temperature"],
|
||||
"-m",
|
||||
$["vertexai-model"],
|
||||
"-i",
|
||||
"non-persistent://tg/request/text-completion-rag",
|
||||
"-o",
|
||||
"non-persistent://tg/response/text-completion-rag",
|
||||
])
|
||||
.with_limits("0.5", "256M")
|
||||
.with_reservations("0.1", "256M")
|
||||
.with_volume_mount(cfgVol, "/vertexai");
|
||||
|
||||
local containerSet = engine.containers(
|
||||
"text-completion-rag", [ container ]
|
||||
);
|
||||
|
||||
local service =
|
||||
engine.internalService(containerSet)
|
||||
.with_port(8000, 8000, "metrics");
|
||||
|
||||
engine.resources([
|
||||
cfgVol,
|
||||
containerSet,
|
||||
service,
|
||||
])
|
||||
|
||||
}
|
||||
|
||||
} + prompts
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue