2222"""
2323
2424
25- async def create_explicit_disptach (http_session : aiohttp .ClientSession ):
26- agent_disptach_service = AgentDispatchService (
25+ async def create_explicit_dispatch (http_session : aiohttp .ClientSession ):
26+ agent_dispatch_service = AgentDispatchService (
2727 session = http_session ,
2828 url = os .getenv ("LIVEKIT_URL" ),
2929 api_key = os .getenv ("LIVEKIT_API_KEY" ),
@@ -32,9 +32,9 @@ async def create_explicit_disptach(http_session: aiohttp.ClientSession):
3232 dispatch_request = CreateAgentDispatchRequest (
3333 agent_name = agent_name , room = room_name , metadata = "my_metadata"
3434 )
35- dispatch = await agent_disptach_service .create_dispatch (dispatch_request )
35+ dispatch = await agent_dispatch_service .create_dispatch (dispatch_request )
3636 print ("created dispatch" , dispatch )
37- dispatches = await agent_disptach_service .list_dispatch (room_name = room_name )
37+ dispatches = await agent_dispatch_service .list_dispatch (room_name = room_name )
3838 print (f"there are { len (dispatches )} dispatches in { room_name } " )
3939
4040
@@ -68,7 +68,7 @@ async def main():
6868 token = await create_token_with_agent_dispatch ()
6969 print ("created participant token" , token )
7070 print ("creating explicit dispatch" )
71- await create_explicit_disptach (http_session )
71+ await create_explicit_dispatch (http_session )
7272
7373
7474asyncio .run (main ())
0 commit comments