fix(azure): add GRAPH_BACKEND, NEO4J, LLM_EMBED, LLM_SMALL to config and bicep
All variables now flow from config.sh through 2-build-deploy.sh to the container env, so GRAPH_BACKEND=graphiti is honoured at runtime. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a209330b0b
commit
fb280011b7
|
|
@ -140,12 +140,19 @@ DEPLOY_OUTPUT=$(az deployment group create \
|
||||||
neo4jPassword="${NEO4J_PASSWORD:-}" \
|
neo4jPassword="${NEO4J_PASSWORD:-}" \
|
||||||
neo4jUri="${NEO4J_URI:-bolt://localhost:7687}" \
|
neo4jUri="${NEO4J_URI:-bolt://localhost:7687}" \
|
||||||
neo4jUser="${NEO4J_USER:-neo4j}" \
|
neo4jUser="${NEO4J_USER:-neo4j}" \
|
||||||
|
neo4jDatabase="${NEO4J_DATABASE:-neo4j}" \
|
||||||
graphBackend="${GRAPH_BACKEND:-zep}" \
|
graphBackend="${GRAPH_BACKEND:-zep}" \
|
||||||
secretKey="$SECRET_KEY" \
|
secretKey="$SECRET_KEY" \
|
||||||
llmBaseUrl="$LLM_BASE_URL" \
|
llmBaseUrl="$LLM_BASE_URL" \
|
||||||
llmModelName="$LLM_MODEL_NAME" \
|
llmModelName="$LLM_MODEL_NAME" \
|
||||||
llmBoostBaseUrl="${LLM_BOOST_BASE_URL:-}" \
|
llmBoostBaseUrl="${LLM_BOOST_BASE_URL:-}" \
|
||||||
llmBoostModelName="${LLM_BOOST_MODEL_NAME:-}" \
|
llmBoostModelName="${LLM_BOOST_MODEL_NAME:-}" \
|
||||||
|
llmEmbedApiKey="${LLM_EMBED_API_KEY:-}" \
|
||||||
|
llmEmbedBaseUrl="${LLM_EMBED_BASE_URL:-}" \
|
||||||
|
llmEmbedModelName="${LLM_EMBED_MODEL_NAME:-}" \
|
||||||
|
llmSmallApiKey="${LLM_SMALL_API_KEY:-}" \
|
||||||
|
llmSmallBaseUrl="${LLM_SMALL_BASE_URL:-}" \
|
||||||
|
llmSmallModelName="${LLM_SMALL_MODEL_NAME:-}" \
|
||||||
oasisDefaultMaxRounds="${OASIS_DEFAULT_MAX_ROUNDS:-10}" \
|
oasisDefaultMaxRounds="${OASIS_DEFAULT_MAX_ROUNDS:-10}" \
|
||||||
reportAgentMaxToolCalls="${REPORT_AGENT_MAX_TOOL_CALLS:-5}" \
|
reportAgentMaxToolCalls="${REPORT_AGENT_MAX_TOOL_CALLS:-5}" \
|
||||||
reportAgentMaxReflectionRounds="${REPORT_AGENT_MAX_REFLECTION_ROUNDS:-2}" \
|
reportAgentMaxReflectionRounds="${REPORT_AGENT_MAX_REFLECTION_ROUNDS:-2}" \
|
||||||
|
|
|
||||||
|
|
@ -53,22 +53,22 @@ ZEP_API_KEY="<la-teva-zep-api-key>"
|
||||||
|
|
||||||
# --- Graphiti + Neo4j (si GRAPH_BACKEND=graphiti) ---
|
# --- Graphiti + Neo4j (si GRAPH_BACKEND=graphiti) ---
|
||||||
# URI bolt del servidor Neo4j (pot ser una VM Azure, ACI, etc.)
|
# URI bolt del servidor Neo4j (pot ser una VM Azure, ACI, etc.)
|
||||||
# NEO4J_URI="bolt://<ip-o-hostname>:7687"
|
NEO4J_URI="bolt://<ip-o-hostname>:7687"
|
||||||
# NEO4J_USER="neo4j"
|
NEO4J_USER="neo4j"
|
||||||
# NEO4J_PASSWORD="<contrasenya-neo4j>"
|
NEO4J_PASSWORD="<contrasenya-neo4j>"
|
||||||
# GRAPHITI_BATCH_SIZE="10" # chunks per crida bulk; més alt = més ràpid però més paral·lelisme LLM
|
NEO4J_DATABASE="neo4j"
|
||||||
|
|
||||||
# --- Embedding LLM (usat per Graphiti per a indexació vectorial) ---
|
# --- Embedding LLM (usat per Graphiti per a indexació vectorial) ---
|
||||||
# Si no s'estableix, fa fallback a LLM_API_KEY / LLM_BASE_URL.
|
# Si no s'estableix, fa fallback a LLM_API_KEY / LLM_BASE_URL.
|
||||||
# LLM_EMBED_API_KEY="<la-teva-embed-api-key>"
|
LLM_EMBED_API_KEY=""
|
||||||
# LLM_EMBED_BASE_URL="https://<recurs>.cognitiveservices.azure.com/openai/deployments/<embed-deployment>/embeddings?api-version=2024-05-01-preview"
|
LLM_EMBED_BASE_URL=""
|
||||||
# LLM_EMBED_MODEL_NAME="text-embedding-3-small"
|
LLM_EMBED_MODEL_NAME="text-embedding-3-small"
|
||||||
|
|
||||||
# --- Small/fast LLM (usat per Graphiti per a reranking i tasques lleugeres) ---
|
# --- Small/fast LLM (usat per Graphiti per a reranking i tasques lleugeres) ---
|
||||||
# Si no s'estableix, fa fallback a LLM_API_KEY / LLM_BASE_URL / LLM_MODEL_NAME.
|
# Si no s'estableix, fa fallback a LLM_API_KEY / LLM_BASE_URL / LLM_MODEL_NAME.
|
||||||
# LLM_SMALL_API_KEY="<la-teva-small-api-key>"
|
LLM_SMALL_API_KEY=""
|
||||||
# LLM_SMALL_BASE_URL="https://<recurs>.cognitiveservices.azure.com/openai/deployments/<small-model>/chat/completions?api-version=2024-05-01-preview"
|
LLM_SMALL_BASE_URL=""
|
||||||
# LLM_SMALL_MODEL_NAME="gpt-4o-mini"
|
LLM_SMALL_MODEL_NAME=""
|
||||||
|
|
||||||
# ── Simulació OASIS (valors per defecte recomanats) ───────────────────────────
|
# ── Simulació OASIS (valors per defecte recomanats) ───────────────────────────
|
||||||
OASIS_DEFAULT_MAX_ROUNDS="10"
|
OASIS_DEFAULT_MAX_ROUNDS="10"
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,35 @@ param llmBoostBaseUrl string = ''
|
||||||
@description('Nom del model LLM accelerador (opcional)')
|
@description('Nom del model LLM accelerador (opcional)')
|
||||||
param llmBoostModelName string = ''
|
param llmBoostModelName string = ''
|
||||||
|
|
||||||
|
// ─── Paràmetres LLM embeddings (opcionals — fallback a LLM principal) ─────────
|
||||||
|
|
||||||
|
@description('Clau API LLM embeddings (opcional)')
|
||||||
|
@secure()
|
||||||
|
param llmEmbedApiKey string = ''
|
||||||
|
|
||||||
|
@description('URL base LLM embeddings (opcional)')
|
||||||
|
param llmEmbedBaseUrl string = ''
|
||||||
|
|
||||||
|
@description('Nom del model d\'embeddings')
|
||||||
|
param llmEmbedModelName string = ''
|
||||||
|
|
||||||
|
// ─── Paràmetres LLM petit/ràpid (opcionals — fallback a LLM principal) ────────
|
||||||
|
|
||||||
|
@description('Clau API LLM petit (opcional)')
|
||||||
|
@secure()
|
||||||
|
param llmSmallApiKey string = ''
|
||||||
|
|
||||||
|
@description('URL base LLM petit (opcional)')
|
||||||
|
param llmSmallBaseUrl string = ''
|
||||||
|
|
||||||
|
@description('Nom del model LLM petit (opcional)')
|
||||||
|
param llmSmallModelName string = ''
|
||||||
|
|
||||||
|
// ─── Paràmetres Neo4j addicionals ─────────────────────────────────────────────
|
||||||
|
|
||||||
|
@description('Nom de la base de dades Neo4j')
|
||||||
|
param neo4jDatabase string = 'neo4j'
|
||||||
|
|
||||||
// ─── Paràmetres de simulació OASIS ───────────────────────────────────────────
|
// ─── Paràmetres de simulació OASIS ───────────────────────────────────────────
|
||||||
|
|
||||||
@description('Nombre màxim de rondes per a la simulació OASIS')
|
@description('Nombre màxim de rondes per a la simulació OASIS')
|
||||||
|
|
@ -115,9 +144,11 @@ var mandatorySecrets = [
|
||||||
{ name: 'secret-key', value: secretKey }
|
{ name: 'secret-key', value: secretKey }
|
||||||
]
|
]
|
||||||
var optionalSecrets = concat(
|
var optionalSecrets = concat(
|
||||||
empty(llmBoostApiKey) ? [] : [{ name: 'llm-boost-api-key', value: llmBoostApiKey }],
|
empty(llmBoostApiKey) ? [] : [{ name: 'llm-boost-api-key', value: llmBoostApiKey }],
|
||||||
empty(zepApiKey) ? [] : [{ name: 'zep-api-key', value: zepApiKey }],
|
empty(llmEmbedApiKey) ? [] : [{ name: 'llm-embed-api-key', value: llmEmbedApiKey }],
|
||||||
empty(neo4jPassword) ? [] : [{ name: 'neo4j-password', value: neo4jPassword }]
|
empty(llmSmallApiKey) ? [] : [{ name: 'llm-small-api-key', value: llmSmallApiKey }],
|
||||||
|
empty(zepApiKey) ? [] : [{ name: 'zep-api-key', value: zepApiKey }],
|
||||||
|
empty(neo4jPassword) ? [] : [{ name: 'neo4j-password', value: neo4jPassword }]
|
||||||
)
|
)
|
||||||
var allSecrets = concat(mandatorySecrets, optionalSecrets)
|
var allSecrets = concat(mandatorySecrets, optionalSecrets)
|
||||||
|
|
||||||
|
|
@ -133,6 +164,11 @@ var mandatoryEnv = [
|
||||||
{ name: 'GRAPH_BACKEND', value: graphBackend }
|
{ name: 'GRAPH_BACKEND', value: graphBackend }
|
||||||
{ name: 'NEO4J_URI', value: neo4jUri }
|
{ name: 'NEO4J_URI', value: neo4jUri }
|
||||||
{ name: 'NEO4J_USER', value: neo4jUser }
|
{ name: 'NEO4J_USER', value: neo4jUser }
|
||||||
|
{ name: 'NEO4J_DATABASE', value: neo4jDatabase }
|
||||||
|
{ name: 'LLM_EMBED_BASE_URL', value: llmEmbedBaseUrl }
|
||||||
|
{ name: 'LLM_EMBED_MODEL_NAME', value: llmEmbedModelName }
|
||||||
|
{ name: 'LLM_SMALL_BASE_URL', value: llmSmallBaseUrl }
|
||||||
|
{ name: 'LLM_SMALL_MODEL_NAME', value: llmSmallModelName }
|
||||||
{ name: 'OASIS_DEFAULT_MAX_ROUNDS', value: oasisDefaultMaxRounds }
|
{ name: 'OASIS_DEFAULT_MAX_ROUNDS', value: oasisDefaultMaxRounds }
|
||||||
{ name: 'REPORT_AGENT_MAX_TOOL_CALLS', value: reportAgentMaxToolCalls }
|
{ name: 'REPORT_AGENT_MAX_TOOL_CALLS', value: reportAgentMaxToolCalls }
|
||||||
{ name: 'REPORT_AGENT_MAX_REFLECTION_ROUNDS', value: reportAgentMaxReflectionRounds }
|
{ name: 'REPORT_AGENT_MAX_REFLECTION_ROUNDS', value: reportAgentMaxReflectionRounds }
|
||||||
|
|
@ -140,9 +176,11 @@ var mandatoryEnv = [
|
||||||
{ name: 'FLASK_DEBUG', value: 'False' }
|
{ name: 'FLASK_DEBUG', value: 'False' }
|
||||||
]
|
]
|
||||||
var optionalEnv = concat(
|
var optionalEnv = concat(
|
||||||
empty(llmBoostApiKey) ? [] : [{ name: 'LLM_BOOST_API_KEY', secretRef: 'llm-boost-api-key' }],
|
empty(llmBoostApiKey) ? [] : [{ name: 'LLM_BOOST_API_KEY', secretRef: 'llm-boost-api-key' }],
|
||||||
empty(zepApiKey) ? [] : [{ name: 'ZEP_API_KEY', secretRef: 'zep-api-key' }],
|
empty(llmEmbedApiKey) ? [] : [{ name: 'LLM_EMBED_API_KEY', secretRef: 'llm-embed-api-key' }],
|
||||||
empty(neo4jPassword) ? [] : [{ name: 'NEO4J_PASSWORD', secretRef: 'neo4j-password' }]
|
empty(llmSmallApiKey) ? [] : [{ name: 'LLM_SMALL_API_KEY', secretRef: 'llm-small-api-key' }],
|
||||||
|
empty(zepApiKey) ? [] : [{ name: 'ZEP_API_KEY', secretRef: 'zep-api-key' }],
|
||||||
|
empty(neo4jPassword) ? [] : [{ name: 'NEO4J_PASSWORD', secretRef: 'neo4j-password' }]
|
||||||
)
|
)
|
||||||
var allEnv = concat(mandatoryEnv, optionalEnv)
|
var allEnv = concat(mandatoryEnv, optionalEnv)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue