2024-08-30 17:47:35 +01:00
|
|
|
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 chunker = import "chunker-recursive.jsonnet";
|
2024-08-14 20:56:57 +01:00
|
|
|
{
|
2024-08-30 17:47:35 +01:00
|
|
|
"aws-id-key":: "${AWS_ID_KEY}",
|
|
|
|
|
"aws-secret-key":: "${AWS_SECRET_KEY}",
|
|
|
|
|
"aws-region":: "us-west-2",
|
|
|
|
|
"bedrock-max-output-tokens":: 4096,
|
|
|
|
|
"bedrock-temperature":: 0.0,
|
|
|
|
|
"bedrock-model":: "mistral.mixtral-8x7b-instruct-v0:1",
|
2024-08-14 20:56:57 +01:00
|
|
|
|
2024-08-30 17:47:35 +01:00
|
|
|
services +: {
|
2024-08-14 20:56:57 +01:00
|
|
|
|
|
|
|
|
"text-completion": base + {
|
|
|
|
|
image: images.trustgraph,
|
|
|
|
|
command: [
|
|
|
|
|
"text-completion-bedrock",
|
|
|
|
|
"-p",
|
|
|
|
|
url.pulsar,
|
|
|
|
|
"-z",
|
2024-08-30 17:47:35 +01:00
|
|
|
$["aws-id-key"],
|
2024-08-14 20:56:57 +01:00
|
|
|
"-k",
|
2024-08-30 17:47:35 +01:00
|
|
|
$["aws-secret-key"],
|
2024-08-14 20:56:57 +01:00
|
|
|
"-r",
|
2024-08-30 17:47:35 +01:00
|
|
|
$["aws-region"],
|
2024-08-22 00:19:55 +01:00
|
|
|
"-x",
|
2024-08-30 17:47:35 +01:00
|
|
|
std.toString($["bedrock-max-output-tokens"]),
|
2024-08-22 00:19:55 +01:00
|
|
|
"-t",
|
2024-08-30 17:47:35 +01:00
|
|
|
std.toString($["bedrock-temperature"]),
|
2024-08-22 00:19:55 +01:00
|
|
|
"-m",
|
2024-08-30 17:47:35 +01:00
|
|
|
$["bedrock-model"],
|
2024-08-14 20:56:57 +01:00
|
|
|
],
|
2024-08-22 17:54:00 +01:00
|
|
|
deploy: {
|
|
|
|
|
resources: {
|
|
|
|
|
limits: {
|
2024-08-22 20:58:44 +01:00
|
|
|
cpus: '0.5',
|
2024-08-22 17:54:00 +01:00
|
|
|
memory: '128M'
|
|
|
|
|
},
|
|
|
|
|
reservations: {
|
|
|
|
|
cpus: '0.1',
|
|
|
|
|
memory: '128M'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-08-14 20:56:57 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
"text-completion-rag": base + {
|
|
|
|
|
image: images.trustgraph,
|
|
|
|
|
command: [
|
|
|
|
|
"text-completion-bedrock",
|
|
|
|
|
"-p",
|
|
|
|
|
url.pulsar,
|
|
|
|
|
"-z",
|
2024-08-30 17:47:35 +01:00
|
|
|
$["aws-id-key"],
|
2024-08-14 20:56:57 +01:00
|
|
|
"-k",
|
2024-08-30 17:47:35 +01:00
|
|
|
$["aws-secret-key"],
|
2024-08-14 20:56:57 +01:00
|
|
|
"-r",
|
2024-08-30 17:47:35 +01:00
|
|
|
$["aws-region"],
|
2024-08-22 00:19:55 +01:00
|
|
|
"-x",
|
2024-08-30 17:47:35 +01:00
|
|
|
std.toString($["bedrock-max-output-tokens"]),
|
2024-08-22 00:19:55 +01:00
|
|
|
"-t",
|
2024-08-30 17:47:35 +01:00
|
|
|
std.toString($["bedrock-temperature"]),
|
2024-08-22 00:19:55 +01:00
|
|
|
"-m",
|
2024-08-30 17:47:35 +01:00
|
|
|
$["bedrock-model"],
|
2024-08-14 20:56:57 +01:00
|
|
|
"-i",
|
|
|
|
|
"non-persistent://tg/request/text-completion-rag",
|
|
|
|
|
"-o",
|
|
|
|
|
"non-persistent://tg/response/text-completion-rag-response",
|
|
|
|
|
],
|
2024-08-22 17:54:00 +01:00
|
|
|
deploy: {
|
|
|
|
|
resources: {
|
|
|
|
|
limits: {
|
2024-08-22 20:58:44 +01:00
|
|
|
cpus: '0.5',
|
2024-08-22 17:54:00 +01:00
|
|
|
memory: '128M'
|
|
|
|
|
},
|
|
|
|
|
reservations: {
|
|
|
|
|
cpus: '0.1',
|
|
|
|
|
memory: '128M'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-08-14 20:56:57 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
},
|
2024-08-30 17:47:35 +01:00
|
|
|
} + prompts + chunker
|
2024-08-23 23:34:16 +01:00
|
|
|
|