Initial commit

This commit is contained in:
Алексей Будаев 2026-04-03 22:53:33 +08:00
commit cda6eb7ce0
680 changed files with 75081 additions and 0 deletions

View file

@ -0,0 +1,27 @@
package com.mistral.chat.data
data class Message(
val id: String = System.currentTimeMillis().toString(),
val content: String,
val isUser: Boolean,
val timestamp: Long = System.currentTimeMillis(),
val senderName: String? = null
)
data class ChatRequest(
val model: String,
val messages: List<Message>,
val temperature: Double = 0.7,
val stream: Boolean = false
)
data class ChatResponse(
val id: String,
val choices: List<Choice>,
val model: String
)
data class Choice(
val index: Int,
val message: Message
)

View file

@ -0,0 +1,17 @@
package com.mistral.chat.data
data class UserProfile(
val name: String = "",
val bio: String = "",
val preferences: String = ""
) {
fun isEmpty(): Boolean = name.isBlank() && bio.isBlank() && preferences.isBlank()
fun toContextString(): String {
return buildString {
if (name.isNotBlank()) append("Name: $name\n")
if (bio.isNotBlank()) append("Bio: $bio\n")
if (preferences.isNotBlank()) append("Preferences: $preferences\n")
}
}
}