chat • AI Agent SDK
chat: Send a message to the remote agent or handle local session.
chat
Method
</div>
This is a method of the Session class in the session module.
Send a message to the remote agent or handle local session.
Signature
def chat(message: str) -> strParameters
ParamField
strThe message to send to the agent **kwargs: Additional parameters for the request
Returns
ResponseField
strThe agent’s response
Exceptions
ValueError
If this is not a remote session
ConnectionError
If unable to communicate with remote agent
Uses
ValueErrorrequests.postresponse.raise_for_statusresponse.jsonConnectionError
Used By
Source
View on GitHubpraisonaiagents/session.py at line 482