trustgraph/templates/components/ollama.jsonnet

63 lines
1 KiB
Jsonnet
Raw Normal View History

local base = import "base.jsonnet";
local images = import "images.jsonnet";
local url = import "url.jsonnet";
{
services +: {
"text-completion": base + {
image: images.trustgraph,
command: [
"text-completion-ollama",
"-p",
url.pulsar,
2024-08-22 00:19:55 +01:00
"-m",
"gemma2:9b",
"-r",
"${OLLAMA_HOST}",
],
deploy: {
resources: {
limits: {
cpus: '0.5',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
},
"text-completion-rag": base + {
image: images.trustgraph,
command: [
"text-completion-ollama",
"-p",
url.pulsar,
2024-08-22 00:19:55 +01:00
"-m",
"gemma2:9b",
"-r",
"${OLLAMA_HOST}",
"-i",
"non-persistent://tg/request/text-completion-rag",
"-o",
"non-persistent://tg/response/text-completion-rag-response",
],
deploy: {
resources: {
limits: {
cpus: '0.5',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
},
},
}