Skip to content

Commit

Permalink
docs(minimal_assistant): use thenable chain (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
nbsp authored Sep 30, 2024
1 parent 4edacb8 commit 575359b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/src/minimal_assistant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ export default defineAgent({
},
});

const session = (await agent.start(ctx.room)) as openai.realtime.RealtimeSession;
const session = await agent
.start(ctx.room)
.then((session) => session as openai.realtime.RealtimeSession);

session.defaultConversation.item.create({
type: 'message',
role: 'user',
Expand Down

0 comments on commit 575359b

Please sign in to comment.