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/gemini.jsonnet";
|
2024-08-14 20:56:57 +01:00
|
|
|
{
|
2024-08-30 17:47:35 +01:00
|
|
|
|
|
|
|
|
"vertexai-model":: "gemini-1.0-pro-001",
|
|
|
|
|
"vertexai-private-key":: "/vertexai/private.json",
|
|
|
|
|
"vertexai-region":: "us-central1",
|
|
|
|
|
"vertexai-max-output-tokens":: 4096,
|
|
|
|
|
"vertexai-temperature":: 0.0,
|
|
|
|
|
|
2024-08-14 20:56:57 +01:00
|
|
|
services +: {
|
|
|
|
|
|
|
|
|
|
"text-completion": base + {
|
|
|
|
|
image: images.trustgraph,
|
|
|
|
|
command: [
|
|
|
|
|
"text-completion-vertexai",
|
|
|
|
|
"-p",
|
|
|
|
|
url.pulsar,
|
|
|
|
|
"-k",
|
2024-08-30 17:47:35 +01:00
|
|
|
$["vertexai-private-key"],
|
2024-08-14 20:56:57 +01:00
|
|
|
"-r",
|
2024-08-30 17:47:35 +01:00
|
|
|
$["vertexai-region"],
|
2024-08-22 00:19:55 +01:00
|
|
|
"-x",
|
2024-08-30 17:47:35 +01:00
|
|
|
std.toString($["vertexai-max-output-tokens"]),
|
2024-08-22 00:19:55 +01:00
|
|
|
"-t",
|
2024-08-30 17:47:35 +01:00
|
|
|
std.toString($["vertexai-temperature"]),
|
|
|
|
|
"-m",
|
|
|
|
|
$["vertexai-model"],
|
2024-08-14 20:56:57 +01:00
|
|
|
],
|
|
|
|
|
volumes: [
|
|
|
|
|
"./vertexai:/vertexai"
|
|
|
|
|
],
|
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-vertexai",
|
|
|
|
|
"-p",
|
|
|
|
|
url.pulsar,
|
|
|
|
|
"-k",
|
2024-08-30 17:47:35 +01:00
|
|
|
$["vertexai-private-key"],
|
2024-08-14 20:56:57 +01:00
|
|
|
"-r",
|
2024-08-30 17:47:35 +01:00
|
|
|
$["vertexai-region"],
|
2024-08-22 00:19:55 +01:00
|
|
|
"-x",
|
2024-08-30 17:47:35 +01:00
|
|
|
std.toString($["vertexai-max-output-tokens"]),
|
2024-08-22 00:19:55 +01:00
|
|
|
"-t",
|
2024-08-30 17:47:35 +01:00
|
|
|
std.toString($["vertexai-temperature"]),
|
|
|
|
|
"-m",
|
|
|
|
|
$["vertexai-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",
|
|
|
|
|
],
|
|
|
|
|
volumes: [
|
|
|
|
|
"./vertexai:/vertexai"
|
|
|
|
|
],
|
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-23 23:34:16 +01:00
|
|
|
} + prompts
|
|
|
|
|
|