@@ -118,12 +118,18 @@ def webrtc(
118
118
),
119
119
deployment : str = typer .Option ("gpt-realtime" , "--deployment" , help = "Deployment name" ),
120
120
voice : str = typer .Option ("verse" , "--voice" , help = "Voice name" ),
121
+ instructions : str = typer .Option (
122
+ "You are a helpful AI assistant responding in natural, engaging language." ,
123
+ "--instructions" ,
124
+ "-i" ,
125
+ help = "Initial assistant instructions for the realtime session" ,
126
+ ),
121
127
):
122
128
"""
123
129
Render the realtime_webrtc HTML template with provided parameters and serve it as a static site.
124
130
125
131
The template is a Jinja2 template and will receive the following variables:
126
- - WEBRTC_URL, SESSIONS_URL, API_KEY, DEPLOYMENT, VOICE
132
+ - WEBRTC_URL, SESSIONS_URL, API_KEY, DEPLOYMENT, VOICE, INSTRUCTIONS
127
133
"""
128
134
settings = Settings ()
129
135
api_key = settings .azure_openai_api_key
@@ -146,6 +152,7 @@ def webrtc(
146
152
API_KEY = json .dumps (api_key ),
147
153
DEPLOYMENT = json .dumps (deployment ),
148
154
VOICE = json .dumps (voice ),
155
+ INSTRUCTIONS = json .dumps (instructions ),
149
156
)
150
157
151
158
tempdir = tempfile .TemporaryDirectory ()
0 commit comments