22
22
"""
23
23
24
24
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 (
27
27
session = http_session ,
28
28
url = os .getenv ("LIVEKIT_URL" ),
29
29
api_key = os .getenv ("LIVEKIT_API_KEY" ),
@@ -32,9 +32,9 @@ async def create_explicit_disptach(http_session: aiohttp.ClientSession):
32
32
dispatch_request = CreateAgentDispatchRequest (
33
33
agent_name = agent_name , room = room_name , metadata = "my_metadata"
34
34
)
35
- dispatch = await agent_disptach_service .create_dispatch (dispatch_request )
35
+ dispatch = await agent_dispatch_service .create_dispatch (dispatch_request )
36
36
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 )
38
38
print (f"there are { len (dispatches )} dispatches in { room_name } " )
39
39
40
40
@@ -68,7 +68,7 @@ async def main():
68
68
token = await create_token_with_agent_dispatch ()
69
69
print ("created participant token" , token )
70
70
print ("creating explicit dispatch" )
71
- await create_explicit_disptach (http_session )
71
+ await create_explicit_dispatch (http_session )
72
72
73
73
74
74
asyncio .run (main ())
0 commit comments