Initial commit
This commit is contained in:
commit
cda6eb7ce0
680 changed files with 75081 additions and 0 deletions
17
app/src/main/java/com/mistral/chat/data/UserProfile.kt
Normal file
17
app/src/main/java/com/mistral/chat/data/UserProfile.kt
Normal 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")
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue