mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-28 01:46:22 +02:00
parent
f7429f2f9b
commit
ddd8cc90e5
20 changed files with 253 additions and 252 deletions
40
templates/components/embeddings-ollama.jsonnet
Normal file
40
templates/components/embeddings-ollama.jsonnet
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
local base = import "base/base.jsonnet";
|
||||
local images = import "values/images.jsonnet";
|
||||
local url = import "values/url.jsonnet";
|
||||
|
||||
{
|
||||
|
||||
"embeddings-model":: "mxbai-embed-large",
|
||||
"ollama-url":: "${OLLAMA_HOST}",
|
||||
|
||||
embeddings +: {
|
||||
|
||||
create:: function(engine)
|
||||
|
||||
local container =
|
||||
engine.container("embeddings")
|
||||
.with_image(images.trustgraph)
|
||||
.with_command([
|
||||
"embeddings-ollama",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"-m",
|
||||
$["embeddings-model"],
|
||||
"-r",
|
||||
$["ollama-url"],
|
||||
])
|
||||
.with_limits("0.5", "128M")
|
||||
.with_reservations("0.1", "128M");
|
||||
|
||||
local containerSet = engine.containers(
|
||||
"embeddings", [ container ]
|
||||
);
|
||||
|
||||
engine.resources([
|
||||
containerSet,
|
||||
])
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue