mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-07 20:32:12 +02:00
78 lines
2.1 KiB
Jsonnet
78 lines
2.1 KiB
Jsonnet
|
|
local base = import "base/base.jsonnet";
|
||
|
|
local images = import "values/images.jsonnet";
|
||
|
|
local url = import "values/url.jsonnet";
|
||
|
|
local prompts = import "prompts/mixtral.jsonnet";
|
||
|
|
|
||
|
|
{
|
||
|
|
|
||
|
|
"document-rag-doc-limit":: 20,
|
||
|
|
|
||
|
|
"document-rag" +: {
|
||
|
|
|
||
|
|
create:: function(engine)
|
||
|
|
|
||
|
|
local container =
|
||
|
|
engine.container("document-rag")
|
||
|
|
.with_image(images.trustgraph_flow)
|
||
|
|
.with_command([
|
||
|
|
"document-rag",
|
||
|
|
"-p",
|
||
|
|
url.pulsar,
|
||
|
|
"--doc-limit",
|
||
|
|
std.toString($["document-rag-doc-limit"]),
|
||
|
|
"--log-level",
|
||
|
|
$["log-level"],
|
||
|
|
])
|
||
|
|
.with_limits("0.5", "128M")
|
||
|
|
.with_reservations("0.1", "128M");
|
||
|
|
|
||
|
|
local containerSet = engine.containers(
|
||
|
|
"document-rag", [ container ]
|
||
|
|
);
|
||
|
|
|
||
|
|
local service =
|
||
|
|
engine.internalService(containerSet)
|
||
|
|
.with_port(8000, 8000, "metrics");
|
||
|
|
|
||
|
|
engine.resources([
|
||
|
|
containerSet,
|
||
|
|
service,
|
||
|
|
])
|
||
|
|
|
||
|
|
},
|
||
|
|
|
||
|
|
"document-embeddings" +: {
|
||
|
|
|
||
|
|
create:: function(engine)
|
||
|
|
|
||
|
|
local container =
|
||
|
|
engine.container("document-embeddings")
|
||
|
|
.with_image(images.trustgraph_flow)
|
||
|
|
.with_command([
|
||
|
|
"document-embeddings",
|
||
|
|
"-p",
|
||
|
|
url.pulsar,
|
||
|
|
"--log-level",
|
||
|
|
$["log-level"],
|
||
|
|
])
|
||
|
|
.with_limits("1.0", "512M")
|
||
|
|
.with_reservations("0.5", "512M");
|
||
|
|
|
||
|
|
local containerSet = engine.containers(
|
||
|
|
"document-embeddings", [ container ]
|
||
|
|
);
|
||
|
|
|
||
|
|
local service =
|
||
|
|
engine.internalService(containerSet)
|
||
|
|
.with_port(8000, 8000, "metrics");
|
||
|
|
|
||
|
|
engine.resources([
|
||
|
|
containerSet,
|
||
|
|
service,
|
||
|
|
])
|
||
|
|
|
||
|
|
},
|
||
|
|
|
||
|
|
}
|
||
|
|
|