Module 12 Β· The AI Assistant & Graduation β Lesson 2 of 4 Β· ~9 min
Talking to the Agent
β data/Models.kt (assistant section)
@Serializable data class AssistantChatRequest( val message: String, ) @Serializable data class DraftBooking( @SerialName("walker_id") val walkerId: String, @SerialName("dog_name") val dogName: String? = null, @SerialName("start_time") val startTime: String? = null, @SerialName("duration_minutes") val durationMinutes: Int = 30, ) @Serializable data class AssistantReply( val reply: String, @SerialName("suggested_walkers") val suggestedWalkers: List<String> = emptyList(), @SerialName("draft_booking") val draftBooking: DraftBooking? = null, )
The same `@SerialName` dance you've done since Module 4: snake_case JSON in, camelCase Kotlin out. `draftBooking` is nullable β the backend only fills it in when it's confident enough to pre-fill a booking.