useAllemCompletion

Text completion hook for single-turn prompts. Returns UseCompletionHelpers from the AI SDK.

import { useAllemCompletion } from "@allem-sdk/ai";

Options

PropTypeDefaultDescription
apistringOverride API endpoint
headersRecord<string, string>Extra headers

Usage

const { completion, complete, isLoading } = useAllemCompletion();

await complete("Write a haiku about React hooks");

<p>{completion}</p>