We are happy to announce the first release of <htt...
# feed
r
We are happy to announce the first release of https://xef.ai/learn/quickstart/kotlin/ . Xef is a multi-platform library that helps you integrate LLMs and AI built with Ktor, Kotlin Serialization and Arrow. Its main feature is automatic serialization from AI responses to models and memory/context management.
Copy code
import com.xebia.functional.xef.auto.*

@Serializable
data class Book(val title: String, val author: String)

suspend fun AIScope.books(topic: String): List<Book> {
  val prompt = buildPrompt {
    + "Give me a selection of books about the following topic:"
    + topic
  }
  return prompt(prompt)
}
Next items in our roadmap are modules for loading local models, and distributed inference and training. I wanted to give a special thank you to everyone working in Kotlin Multiplatform which is enabling Xef to run in so many places with ease. 🙏
😮 1
🚀 6