Chat Repository
Access AI chat functionality from TypeScript using the chat repository pattern.
The chat repository provides a data layer for AI chat operations in the backoffice frontend, abstracting the Management API calls behind a consistent interface.
UaiChatRepository
The UaiChatRepository handles server communication for chat operations. Use UaiChatController for higher-level chat interactions instead of calling the repository directly.
import { UaiChatRepository } from "@umbraco-ai/core";
const repository = new UaiChatRepository(host);When to Use
Chat completions with cancellation
UaiChatController
Direct API calls for chat data
UaiChatRepository
Custom chat implementations
UaiChatRepository
For most use cases, prefer UaiChatController which wraps the repository with a simpler API surface.
Related
Chat Controller - Higher-level chat interface
Types - TypeScript type definitions
Last updated
Was this helpful?