ChatResponse.error constructor

ChatResponse.error(
  1. String message, {
  2. ChatResponseStatus? status,
})

Create an error response.

Implementation

factory ChatResponse.error(String message, {ChatResponseStatus? status}) {
  return ChatResponse(
    messages: const [],
    success: false,
    status: status ?? ChatResponseStatus.error,
    error: message,
  );
}