Skip to content

Commit 4255c2a

Browse files
committed
Get Alice to be briefer.
1 parent e7c9fb0 commit 4255c2a

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

  • examples/WebRTCExamples/WebRTCOpenAIAliceAndBob

examples/WebRTCExamples/WebRTCOpenAIAliceAndBob/Program.cs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,13 @@ static void Main(string[] args)
152152

153153
Task.WaitAll(aliceCallTask, bobCallTask);
154154

155-
if (aliceCallTask.Result.IsLeft)
156-
{
157-
logger.LogError($"First call failed. {((Problem)aliceCallTask.Result).detail}");
158-
exitMre.Set();
159-
}
160-
else if (bobCallTask.Result.IsLeft)
155+
var combinedCtx = from aliceCtx in aliceCallTask.Result
156+
from bobCtx in bobCallTask.Result
157+
select (aliceCtx, bobCtx);
158+
159+
if (combinedCtx.IsLeft)
161160
{
162-
logger.LogError($"Second call failed. {((Problem)bobCallTask.Result).detail}");
161+
logger.LogError($"There was a problem initiating the connections. {((Problem)combinedCtx).detail}");
163162
exitMre.Set();
164163
}
165164
else
@@ -196,8 +195,7 @@ static void Main(string[] args)
196195
EventID = Guid.NewGuid().ToString(),
197196
Response = new OpenAIResponseCreateResponse
198197
{
199-
//Instructions = "Hi There! Give me an example of a funny insult that I can use in an English teaching example and that's not disrespectful.",
200-
Instructions = "Only talk in cheesy puns. To start the conversation please repeat repeat this phrase in your corniest accent: 'You're a few tinnies short of a six-pack.'",
198+
Instructions = "Only talk in cheesy puns. Keep it short once you'vegot you pun in. To start the conversation please repeat repeat this phrase in your corniest accent: 'You're a few tinnies short of a six-pack.'",
201199
Voice = VoicesEnum.shimmer.ToString()
202200
}
203201
};

0 commit comments

Comments
 (0)