Sends a message to the chatbot and receives a response.
Args: message: The user message containing text and user_type db: Database session dependency token: Verified API token
Returns: JSON response with user_type and the agent’s response
Raises: HTTPException: If the user_type is invalid or token is invalid
| Parameter | Type | Required | Description |
|---|---|---|---|
| authorization | string | Yes | API authorization token |
| Property | Type | Required | Description |
|---|---|---|---|
| text | string | Yes | The message text to send |
| user_id | string | No | User identifier, one of: “User1” through “User20”. Default: User1 |
| user_type | string | No | The type of user (Patient, Doctor, Coach). Default: Patient |
| model_id | string | No | The model ID (openai, gemini). Default: openai |
| Status | Description | Content Type |
|---|---|---|
| 200 | Chatbot response | application/json |
| 401 | Unauthorized | application/json |
| 422 | Validation Error | application/json |