For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

Example
import { UaiChatRepository } from "@umbraco-ai/core";

const repository = new UaiChatRepository(host);

When to Use

Scenario
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.

Last updated

Was this helpful?