Skip to main content

<Modern AI> made easy.

XEF is a library to bring the power of modern AI to your application or service, in the form of LLM (Large Language Models), image generation, and many others.

Model Driven Design

Embrace AI with our innovative Model Driven Design. Accessing AI's power becomes just a function call away by automatically serializing AI responses to your defined models. Revolutionize your development process and amplify the user experience, all while keeping the control in your hands.

Get started

Context Scopes

Experience the sophistication of AI with our Context Scopes. They provide the AI with access to a memory and vector store context, ensuring the AI has the necessary data to make informed decisions. Streamline your workflow with smart resource management and watch as your applications gain a mind of their own.

Get started

Integrations

Extend your reach with our extensive Integrations. Connect seamlessly with third-party data stores like Lucene and PostgreSQL and load data from CSV, PDF, Git, and others. Enrich the AI's context with diverse and detailed information, enabling it to generate more comprehensive and accurate responses.

Get started

Discover its potential

package examples

import com.xebia.functional.xef.conversation.llm.openai.OpenAI
import com.xebia.functional.xef.conversation.llm.openai.prompt
import kotlinx.serialization.Serializable

@Serializable
data class TouristAttraction(val name: String, val location: String, val history: String)

suspend fun main() =
OpenAI.conversation {
val statueOfLiberty: TouristAttraction = prompt("Statue of Liberty location and history.")
println(
"""|${statueOfLiberty.name} is located in ${statueOfLiberty.location} and has the following history:
|${statueOfLiberty.history}"""
.trimMargin()
)
}