Skip to main content

Send Sina Message

Sends a user message to Sina AI and retrieves the response.

Request

final response = await apiService.sendSinaMessage(
sessionId: \"session-123\",
message: \"I have a headache, what should I do?\"
);

Response Structure

Returns a SinaMessage object containing:

  • id: (int) Message ID.
  • text: (String) The response text from Sina.
  • sender: (String) "sina".
  • chatId: (String) Session ID.
  • createdAt: (String) ISO timestamp.

Error Handling

Throws a HttpResponseException if the request fails or if the session is invalid.