mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-03 23:11:00 +02:00
git-subtree-dir: ai-context/trustgraph-templates git-subtree-split: 42a5fd1b678f32be378062e30451e2052ccb95dd
49 lines
1.3 KiB
Jsonnet
49 lines
1.3 KiB
Jsonnet
local images = import "values/images.jsonnet";
|
|
local url = import "values/url.jsonnet";
|
|
local prompts = import "prompts/mixtral.jsonnet";
|
|
local models = import "parameters/embeddings-fastembed.jsonnet";
|
|
|
|
{
|
|
|
|
"fastembed-models":: models,
|
|
|
|
"embeddings-models" +:: $["fastembed-models"],
|
|
|
|
embeddings +: {
|
|
|
|
create:: function(engine)
|
|
|
|
local concurrency = self.concurrency;
|
|
|
|
local container =
|
|
engine.container("embeddings")
|
|
.with_image(images.trustgraph_flow)
|
|
.with_command([
|
|
"embeddings-fastembed",
|
|
"-p",
|
|
url.pulsar,
|
|
"--concurrency",
|
|
std.toString(concurrency),
|
|
"--log-level",
|
|
$["log-level"],
|
|
])
|
|
.with_limits("1.0", "400M")
|
|
.with_reservations("0.5", "400M");
|
|
|
|
local containerSet = engine.containers(
|
|
"embeddings", [ container ]
|
|
);
|
|
|
|
local service =
|
|
engine.internalService(containerSet)
|
|
.with_port(8000, 8000, "metrics");
|
|
|
|
engine.resources([
|
|
containerSet,
|
|
service,
|
|
])
|
|
|
|
},
|
|
|
|
}
|
|
|