Aller directement au contenu principal

openhands.server.session.session

Session Objects

class Session()

on_event

async def on_event(event: Event)

Callback function for events that mainly come from the agent. Event is the base class for any agent action and observation.

Arguments:

  • event - The agent event (Observation or Action).

send_error

async def send_error(message: str) -> bool

Sends an error message to the client.

send_message

async def send_message(message: str) -> bool

Sends a message to the client.

send_status_message

async def send_status_message(message: str) -> bool

Sends a status message to the client.

queue_status_message

def queue_status_message(message: str)

Queues a status message to be sent asynchronously.