useAllemCompletion
Text completion hook for single-turn prompts. Returns UseCompletionHelpers from the AI SDK.
import { useAllemCompletion } from "@allem-sdk/ai";Options
| Prop | Type | Default | Description |
|---|---|---|---|
| api | string | — | Override API endpoint |
| headers | Record<string, string> | — | Extra headers |
Usage
const { completion, complete, isLoading } = useAllemCompletion();
await complete("Write a haiku about React hooks");
<p>{completion}</p>