What problem does it solve?
Integrating AI capabilities like chat, embeddings, and vector search into traditional applications can be complex, requiring separate libraries and data stores. This Skill provides a native, seamless way to embed AI directly into your Koan entities and workflows.
Core Features & Use Cases
- Native Chat Endpoints: Easily expose AI chat functionality through standard controllers, leveraging configured AI providers.
- Entity Embeddings: Store vector embeddings directly on your entities, enabling semantic search and similarity comparisons.
- RAG Workflows: Build Retrieval-Augmented Generation (RAG) systems by combining vector search for relevant documents with AI chat for contextual answers.
- Vector Search: Perform semantic searches on your data, finding related items based on meaning, not just keywords.
- Use Case: Create a product catalog where users can search for "eco-friendly laptops" using natural language, powered by vector embeddings and AI, or build a customer support chatbot that answers questions based on your knowledge base.
Quick Start
To enable AI chat in your application, inject IAi into your controller and use it:
public class ChatController : ControllerBase {
private readonly IAi _ai;
public ChatController(IAi ai) => _ai = ai;
[HttpPost]
public async Task<IActionResult> Chat([FromBody] ChatRequest request) {
var response = await _ai.ChatAsync(new AiChatRequest { Messages = request.Messages });
return Ok(new { message = response.Content });
}
}