send method
Sends content to the server.
input (optional): The content to send.
turnComplete (optional): Indicates if the turn is complete. Defaults to false.
Implementation
Future<void> send({
Content? input,
bool turnComplete = false,
}) async {
_checkWsStatus();
var clientMessage = input != null
? LiveClientContent(turns: [input], turnComplete: turnComplete)
: LiveClientContent(turnComplete: turnComplete);
var clientJson = jsonEncode(clientMessage.toJson());
_ws.sink.add(clientJson);
}