Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions fishjam/agent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,13 @@ async def add_track(self, options: OutgoingAudioTrackOptions):
async def _send(self, message: AgentRequest):
await self._ws.send(bytes(message), text=False)

async def disconnect(self):
"""
Ends the agent session by closing the websocket connection.
Useful when you don't use the context manager to obtain the session.
"""
await self._ws.close()


class Agent:
"""
Expand Down