mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-06-02 11:25:14 +02:00
Merge branch 'master' into release/v0.10. Includes llamafile and
prompt modifications.
This commit is contained in:
commit
39cf256f5c
33 changed files with 1234 additions and 95 deletions
|
|
@ -68,6 +68,31 @@ local url = import "values/url.jsonnet";
|
|||
|
||||
},
|
||||
|
||||
"kg-extract-topics" +: {
|
||||
|
||||
create:: function(engine)
|
||||
|
||||
local container =
|
||||
engine.container("kg-extract-topics")
|
||||
.with_image(images.trustgraph)
|
||||
.with_command([
|
||||
"kg-extract-topics",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
])
|
||||
.with_limits("0.5", "128M")
|
||||
.with_reservations("0.1", "128M");
|
||||
|
||||
local containerSet = engine.containers(
|
||||
"kg-extract-topics", [ container ]
|
||||
);
|
||||
|
||||
engine.resources([
|
||||
containerSet,
|
||||
])
|
||||
|
||||
},
|
||||
|
||||
"graph-rag" +: {
|
||||
|
||||
create:: function(engine)
|
||||
|
|
|
|||
75
templates/components/llamafile.jsonnet
Normal file
75
templates/components/llamafile.jsonnet
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
local base = import "base/base.jsonnet";
|
||||
local images = import "values/images.jsonnet";
|
||||
local url = import "values/url.jsonnet";
|
||||
local prompts = import "prompts/slm.jsonnet";
|
||||
|
||||
{
|
||||
|
||||
"llamafile-model":: "LLaMA_CPP",
|
||||
"llamafile-url":: "${LLAMAFILE_URL}",
|
||||
|
||||
"text-completion" +: {
|
||||
|
||||
create:: function(engine)
|
||||
|
||||
local container =
|
||||
engine.container("text-completion")
|
||||
.with_image(images.trustgraph)
|
||||
.with_command([
|
||||
"text-completion-llamafile",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"-m",
|
||||
$["llamafile-model"],
|
||||
"-r",
|
||||
$["llamafile-url"],
|
||||
])
|
||||
.with_limits("0.5", "128M")
|
||||
.with_reservations("0.1", "128M");
|
||||
|
||||
local containerSet = engine.containers(
|
||||
"text-completion", [ container ]
|
||||
);
|
||||
|
||||
engine.resources([
|
||||
containerSet,
|
||||
])
|
||||
|
||||
},
|
||||
|
||||
"text-completion-rag" +: {
|
||||
|
||||
create:: function(engine)
|
||||
|
||||
local container =
|
||||
engine.container("text-completion-rag")
|
||||
.with_image(images.trustgraph)
|
||||
.with_command([
|
||||
"text-completion-llamafile",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"-m",
|
||||
$["llamafile-model"],
|
||||
"-r",
|
||||
$["llamafile-url"],
|
||||
"-i",
|
||||
"non-persistent://tg/request/text-completion-rag",
|
||||
"-o",
|
||||
"non-persistent://tg/response/text-completion-rag-response",
|
||||
])
|
||||
.with_limits("0.5", "128M")
|
||||
.with_reservations("0.1", "128M");
|
||||
|
||||
local containerSet = engine.containers(
|
||||
"text-completion-rag", [ container ]
|
||||
);
|
||||
|
||||
engine.resources([
|
||||
containerSet,
|
||||
])
|
||||
|
||||
|
||||
}
|
||||
|
||||
} + prompts
|
||||
|
||||
|
|
@ -25,6 +25,8 @@ local default_prompts = import "prompts/default-prompts.jsonnet";
|
|||
$["prompt-definition-template"],
|
||||
"--relationship-template",
|
||||
$["prompt-relationship-template"],
|
||||
"--topic-template",
|
||||
$["prompt-topic-template"],
|
||||
"--knowledge-query-template",
|
||||
$["prompt-knowledge-query-template"],
|
||||
"--document-query-template",
|
||||
|
|
@ -73,6 +75,8 @@ local default_prompts = import "prompts/default-prompts.jsonnet";
|
|||
$["prompt-definition-template"],
|
||||
"--relationship-template",
|
||||
$["prompt-relationship-template"],
|
||||
"--topic-template",
|
||||
$["prompt-topic-template"],
|
||||
"--knowledge-query-template",
|
||||
$["prompt-knowledge-query-template"],
|
||||
"--document-query-template",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue