Repository navigation
Expand file tree
/
Copy pathapp.yaml
More file actions
109 lines (101 loc) 路 4.79 KB
/
Copy pathapp.yaml
File metadata and controls
109 lines (101 loc) 路 4.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# Databricks App spec for the Unity Gateway Voice Studio. One container runs the
# stdlib web/token tier (app/web_server.py) and the LiveKit agent worker
# (app/agent.py) side by side, launched by start_app.py (pure Python; the Apps
# image has no Node). The web tier binds the port immediately; the worker boots
# behind it in an isolated /tmp/agent-venv.
#
# Credentials come from app SECRET resources backed by the `ug-voice-studio`
# secret scope (no secret values live in this file). Everything else is
# non-sensitive config. The app authenticates to Databricks with the injected
# PAT (DATABRICKS_TOKEN); start_app.py drops the runtime's OAuth SP creds so the
# SDK has one unambiguous auth method (matches local behavior).
command: ["python", "start_app.py"]
env:
# --- runtime / agent identity (non-secret) ---
- name: PORT
value: "8000"
- name: AGENT_NAME
value: "ug-agent"
# --- secrets (valueFrom -> app secret resource -> ug-voice-studio scope) ---
- name: LIVEKIT_URL
valueFrom: livekit-url
- name: LIVEKIT_API_KEY
valueFrom: livekit-api-key
- name: LIVEKIT_API_SECRET
valueFrom: livekit-api-secret
- name: DEEPGRAM_API_KEY
valueFrom: deepgram-api-key
- name: DATABRICKS_TOKEN
valueFrom: database-token
# Plan 5 Halloween voice (ElevenLabs). `elevenlabs-api-key` is an app secret
# resource bound to a key in the ug-voice-studio scope (suggested key name:
# `elevenlabs_api_key`). The secret VALUE and that resource binding are created
# OUT-OF-BAND by the owner (see skills/building-voice-agents-on-databricks/
# references/deployment.md) -- no key value ever lives in this repo. Attach the
# resource BEFORE deploying this file: a `valueFrom` only resolves once the app
# resource exists. If the key is missing or unusable at runtime the Halloween
# voice drops to the Deepgram fallback voice and the call carries on.
- name: ELEVEN_API_KEY
valueFrom: elevenlabs-api-key
# --- Databricks workspace (non-secret) ---
- name: DATABRICKS_HOST
value: "https://your-workspace.cloud.databricks.com"
# --- Lakebase (non-secret config; token minted at runtime via the SDK) ---
- name: LAKEBASE_ENDPOINT
value: "projects/your-project/branches/production/endpoints/primary"
- name: LAKEBASE_DATABASE
value: "databricks_postgres"
- name: UG_SCHEMA
value: "ug"
# --- Unity Gateway tier->model routing map (non-secret) ---
- name: UG_MODEL_STANDARD
value: "system.ai.gpt-5-nano"
- name: UG_MODEL_PREMIUM
value: "system.ai.gpt-5-5"
- name: UG_MODEL_VIP
value: "system.ai.gpt-6-sol"
- name: UG_MODEL_FALLBACK
value: "system.ai.gpt-5-5"
- name: UG_EMBED_MODEL
value: "system.ai.gte-large-en"
- name: UG_GEN_MODEL
value: "system.ai.gpt-5-4"
# --- Plan 5: AI Decide, the per-turn voice-mode decision (non-secret) ---
# AI Decide decides the voice mode each turn by calling the Databricks
# `ai_decide` function. It needs `ai_decide` enabled on the workspace (admin ->
# Previews); without it, explicit requests still work through the rule-based
# check. UG_AI_DECIDE=0 is the kill switch.
- name: UG_AI_DECIDE
value: "1" # kill switch: "0" = never classify, stay in the standard voice
- name: UG_DECIDE_TIMEOUT_S
value: "3.0" # limit on the background decision call
- name: UG_DECIDE_CUE_WAIT_S
value: "0.8" # longest a turn waits for the decision before replying in the current voice
# --- Plan 5: Halloween voice (non-secret; the key is ELEVEN_API_KEY above) ---
- name: UG_HALLOWEEN_TTS
value: "elevenlabs" # elevenlabs | openai | deepgram
- name: UG_HALLOWEEN_TTS_MODEL
value: "eleven_v3_conversational" # only eleven_v3* models perform inline [tags]; any other model gets none
- name: UG_HALLOWEEN_STABILITY
value: "0.5" # ElevenLabs voice setting, 0 to 1
- name: UG_HALLOWEEN_FALLBACK_VOICE
value: "aura-2-zeus-en" # Deepgram voice used when ElevenLabs is unavailable
# UG_HALLOWEEN_VOICE_ID is REQUIRED for the ElevenLabs voice and is the owner's
# pick (chosen by ear). It is deliberately left unset here: with no voice id the
# Halloween profile is the Deepgram fallback voice above, never ElevenLabs' stock
# voice. To enable the ElevenLabs voice, add this entry:
# - name: UG_HALLOWEEN_VOICE_ID
# value: "<elevenlabs-voice-id>"
# --- optional tracing (fail-soft if unavailable) ---
- name: OTEL_SERVICE_NAME
value: "ug-voice-agent"
- name: DATABRICKS_TRACE_CATALOG
value: "your_catalog"
- name: DATABRICKS_TRACE_SCHEMA
value: "your_schema"
- name: DATABRICKS_TRACE_TABLE_PREFIX
value: "ugvoice"
- name: MLFLOW_EXPERIMENT_NAME
value: "/Users/you@example.com/ugvoice"
- name: MLFLOW_TRACING_SQL_WAREHOUSE_ID
value: "your-sql-warehouse-id"