mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-17 09:11:03 +02:00
Update Azure with new macros for env vars in secrets
This commit is contained in:
parent
1588d6a4f2
commit
0369072bdd
1 changed files with 12 additions and 10 deletions
|
|
@ -5,8 +5,6 @@ local prompts = import "prompts/mixtral.jsonnet";
|
|||
|
||||
{
|
||||
|
||||
"azure-token":: "${AZURE_TOKEN}",
|
||||
"azure-endpoint":: "${AZURE_ENDPOINT}",
|
||||
"azure-max-output-tokens":: 4096,
|
||||
"azure-temperature":: 0.0,
|
||||
|
||||
|
|
@ -14,6 +12,10 @@ local prompts = import "prompts/mixtral.jsonnet";
|
|||
|
||||
create:: function(engine)
|
||||
|
||||
local envSecrets = engine.envSecrets("azure-credentials")
|
||||
.with_env_var("AZURE_TOKEN")
|
||||
.with_env_var("AZURE_ENDPOINT");
|
||||
|
||||
local container =
|
||||
engine.container("text-completion")
|
||||
.with_image(images.trustgraph)
|
||||
|
|
@ -21,15 +23,12 @@ local prompts = import "prompts/mixtral.jsonnet";
|
|||
"text-completion-azure",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"-k",
|
||||
$["azure-token"],
|
||||
"-e",
|
||||
$["azure-endpoint"],
|
||||
"-x",
|
||||
std.toString($["azure-max-output-tokens"]),
|
||||
"-t",
|
||||
std.toString($["azure-temperature"]),
|
||||
])
|
||||
.with_env_var_secrets(envSecrets)
|
||||
.with_limits("0.5", "128M")
|
||||
.with_reservations("0.1", "128M");
|
||||
|
||||
|
|
@ -42,6 +41,7 @@ local prompts = import "prompts/mixtral.jsonnet";
|
|||
.with_port(8000, 8000, "metrics");
|
||||
|
||||
engine.resources([
|
||||
envSecrets,
|
||||
containerSet,
|
||||
service,
|
||||
])
|
||||
|
|
@ -52,6 +52,10 @@ local prompts = import "prompts/mixtral.jsonnet";
|
|||
|
||||
create:: function(engine)
|
||||
|
||||
local envSecrets = engine.envSecrets("azure-credentials-rag")
|
||||
.with_env_var("AZURE_TOKEN")
|
||||
.with_env_var("AZURE_ENDPOINT");
|
||||
|
||||
local container =
|
||||
engine.container("text-completion-rag")
|
||||
.with_image(images.trustgraph)
|
||||
|
|
@ -59,10 +63,6 @@ local prompts = import "prompts/mixtral.jsonnet";
|
|||
"text-completion-azure",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"-k",
|
||||
$["azure-token"],
|
||||
"-e",
|
||||
$["azure-endpoint"],
|
||||
"-x",
|
||||
std.toString($["azure-max-output-tokens"]),
|
||||
"-t",
|
||||
|
|
@ -72,6 +72,7 @@ local prompts = import "prompts/mixtral.jsonnet";
|
|||
"-o",
|
||||
"non-persistent://tg/response/text-completion-rag-response",
|
||||
])
|
||||
.with_env_var_secrets(envSecrets)
|
||||
.with_limits("0.5", "128M")
|
||||
.with_reservations("0.1", "128M");
|
||||
|
||||
|
|
@ -84,6 +85,7 @@ local prompts = import "prompts/mixtral.jsonnet";
|
|||
.with_port(8000, 8000, "metrics");
|
||||
|
||||
engine.resources([
|
||||
envSecrets,
|
||||
containerSet,
|
||||
service,
|
||||
])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue