mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-17 01:01:03 +02:00
Add metering-rag for RAG token metrics
This commit is contained in:
parent
6d57b7a6f3
commit
db9c41d1c0
1 changed files with 32 additions and 0 deletions
|
|
@ -132,5 +132,37 @@ local prompt = import "prompt-template.jsonnet";
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"metering-rag" +: {
|
||||||
|
|
||||||
|
create:: function(engine)
|
||||||
|
|
||||||
|
local container =
|
||||||
|
engine.container("metering-rag")
|
||||||
|
.with_image(images.trustgraph)
|
||||||
|
.with_command([
|
||||||
|
"metering",
|
||||||
|
"-p",
|
||||||
|
url.pulsar,
|
||||||
|
"-i",
|
||||||
|
"non-persistent://tg/request/text-completion-rag",
|
||||||
|
])
|
||||||
|
.with_limits("0.5", "128M")
|
||||||
|
.with_reservations("0.1", "128M");
|
||||||
|
|
||||||
|
local containerSet = engine.containers(
|
||||||
|
"metering-rag", [ container ]
|
||||||
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8000, 8000, "metrics");
|
||||||
|
|
||||||
|
engine.resources([
|
||||||
|
containerSet,
|
||||||
|
service,
|
||||||
|
])
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
} + prompt
|
} + prompt
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue