mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-25 16:36:21 +02:00
Added agent support to templates (#150)
This commit is contained in:
parent
f654d72515
commit
efd13ae5f1
5 changed files with 158 additions and 0 deletions
60
templates/components/agent-manager-react.jsonnet
Normal file
60
templates/components/agent-manager-react.jsonnet
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
local base = import "base/base.jsonnet";
|
||||
local images = import "values/images.jsonnet";
|
||||
local url = import "values/url.jsonnet";
|
||||
local prompts = import "prompts/mixtral.jsonnet";
|
||||
local default_prompts = import "prompts/default-prompts.jsonnet";
|
||||
|
||||
{
|
||||
|
||||
tools:: [],
|
||||
|
||||
"agent-manager" +: {
|
||||
|
||||
create:: function(engine)
|
||||
|
||||
local container =
|
||||
engine.container("agent-manager")
|
||||
.with_image(images.trustgraph)
|
||||
.with_command([
|
||||
"agent-manager-react",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"--tool-type",
|
||||
] + [
|
||||
tool.id + "=" + tool.type
|
||||
for tool in $.tools
|
||||
] + [
|
||||
"--tool-description"
|
||||
] + [
|
||||
tool.id + "=" + tool.description
|
||||
for tool in $.tools
|
||||
] + [
|
||||
"--tool-argument"
|
||||
] + [
|
||||
"%s=%s:%s:%s" % [
|
||||
tool.id, arg.name, arg.type, arg.description
|
||||
]
|
||||
for tool in $.tools
|
||||
for arg in tool.arguments
|
||||
]
|
||||
)
|
||||
.with_limits("0.5", "128M")
|
||||
.with_reservations("0.1", "128M");
|
||||
|
||||
local containerSet = engine.containers(
|
||||
"agent-manager", [ container ]
|
||||
);
|
||||
|
||||
local service =
|
||||
engine.internalService(containerSet)
|
||||
.with_port(8000, 8000, "metrics");
|
||||
|
||||
engine.resources([
|
||||
containerSet,
|
||||
service,
|
||||
])
|
||||
|
||||
},
|
||||
|
||||
} + default_prompts
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue